@@ -183,33 +183,35 @@ function(neo_gen_kernels target platform_name suffix)
183183 set_target_properties (${target} PROPERTIES FOLDER "kernels/${suffix} " )
184184endfunction ()
185185
186- function (neo_gen_kernel_with_options target platform_name suffix filepath )
187- get_filename_component (filename ${filepath} NAME )
188- get_filename_component (basename ${filepath} NAME_WE )
189- get_filename_component (base_workdir ${filepath} DIRECTORY )
190-
191- set (outputdir "${TargetDir} /${suffix} /test_files/${NEO_ARCH} /" )
192- set (workdir "${CMAKE_CURRENT_SOURCE_DIR} /${base_workdir} /" )
193-
186+ function (neo_gen_kernels_with_options target platform_name suffix filepath )
194187 set (results)
195- foreach (arg ${ARGN} )
196- string (REPLACE " " "_" argwospaces ${arg} )
197-
198- set (outputpath_base "${outputdir} /${basename} _${suffix} " )
199- set (output_files
200- ${outputpath_base}${ir_extension}${argwospaces}
201- ${outputpath_base} .bin${argwospaces}
202- ${outputpath_base} .gen${argwospaces}
203- )
204-
205- add_custom_command (
206- OUTPUT ${output_files}
207- COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -options ${arg} -options_name
208- WORKING_DIRECTORY ${workdir}
209- DEPENDS ${filepath} cloc
210- )
211-
212- list (APPEND results ${output_files} )
188+ foreach (filearg ${filepath} )
189+ get_filename_component (filename ${filearg} NAME )
190+ get_filename_component (basename ${filearg} NAME_WE )
191+ get_filename_component (base_workdir ${filearg} DIRECTORY )
192+
193+ set (outputdir "${TargetDir} /${suffix} /test_files/${NEO_ARCH} /" )
194+ set (workdir "${CMAKE_CURRENT_SOURCE_DIR} /${base_workdir} /" )
195+
196+ foreach (arg ${ARGN} )
197+ string (REPLACE " " "_" argwospaces ${arg} )
198+
199+ set (outputpath_base "${outputdir} /${basename} _${suffix} " )
200+ set (output_files
201+ ${outputpath_base}${ir_extension}${argwospaces}
202+ ${outputpath_base} .bin${argwospaces}
203+ ${outputpath_base} .gen${argwospaces}
204+ )
205+
206+ add_custom_command (
207+ OUTPUT ${output_files}
208+ COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -options ${arg} -options_name
209+ WORKING_DIRECTORY ${workdir}
210+ DEPENDS ${filearg} cloc
211+ )
212+
213+ list (APPEND results ${output_files} )
214+ endforeach ()
213215 endforeach ()
214216 add_custom_target (${target} DEPENDS ${results} copy_compiler_files)
215217 set_target_properties (${target} PROPERTIES FOLDER "kernels/${suffix} " )
@@ -293,6 +295,7 @@ set(TEST_KERNEL_2_0_options
293295
294296set (TEST_KERNEL_2_0
295297 test_files/simple_block_kernel.cl
298+ test_files/simple_nonuniform.cl
296299)
297300
298301set (TEST_KERNEL_SIP_DEBUG_options
@@ -306,6 +309,7 @@ set(TEST_KERNEL_SIP_DEBUG_LOCAL_options
306309file (GLOB_RECURSE TEST_KERNELS test_files/*.cl)
307310list (REMOVE_ITEM TEST_KERNELS "${CMAKE_CURRENT_SOURCE_DIR} /test_files/shouldfail.cl" )
308311list (REMOVE_ITEM TEST_KERNELS "${CMAKE_CURRENT_SOURCE_DIR} /test_files/simple_block_kernel.cl" )
312+ list (REMOVE_ITEM TEST_KERNELS "${CMAKE_CURRENT_SOURCE_DIR} /test_files/simple_nonuniform.cl" )
309313
310314function (gen_run_tests_with_appverifier product slices subslices eu_per_ss)
311315 if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND "${IGDRCL_OPTION__BITS} " STREQUAL "64" AND APPVERIFIER_ALLOWED)
@@ -373,7 +377,7 @@ macro(macro_for_each_gen)
373377
374378 if (MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8)
375379 neo_gen_kernels(test_kernels_${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNELS} )
376- neo_gen_kernel_with_options (test_kernel_${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL} ${TEST_KERNEL_options} )
380+ neo_gen_kernels_with_options (test_kernel_${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL} ${TEST_KERNEL_options} )
377381
378382 # Temporarily disabled debug kernel generation on gen8
379383 if (NOT ("${GEN_TYPE_LOWER} " STREQUAL "gen8" ))
@@ -399,7 +403,7 @@ macro(macro_for_each_gen)
399403 # add_dependencies(unit_tests test_kernel_sip_debug_${family_name_with_type})
400404
401405 if (PLATFORM_2_0_LOWER)
402- neo_gen_kernel_with_options (test_kernel_2_0_${family_name_with_type} ${PLATFORM_2_0_LOWER} ${family_name_with_type} ${TEST_KERNEL_2_0} ${TEST_KERNEL_2_0_options} )
406+ neo_gen_kernels_with_options (test_kernel_2_0_${family_name_with_type} ${PLATFORM_2_0_LOWER} ${family_name_with_type} " ${TEST_KERNEL_2_0} " ${TEST_KERNEL_2_0_options} )
403407 endif ()
404408 endif ()
405409 endif ()
0 commit comments