Skip to content

Commit 7232ef5

Browse files
committed
Remove indirection from ocloc_lib and ocloc names
This allows CMAKE to wrap the executable with -DCMAKE_CROSSCOMPILING_EMULATOR=... Signed-off-by: Zoltán Böszörményi <[email protected]>
1 parent 586eaea commit 7232ef5

File tree

6 files changed

+40
-109
lines changed

6 files changed

+40
-109
lines changed

opencl/source/built_ins/kernels/CMakeLists.txt

+1-12
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,11 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
6161
unset(BUILTIN_CPP)
6262
# set variable outside function
6363
set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE)
64-
if(NOT DEFINED cloc_cmd_prefix)
65-
if(WIN32)
66-
set(cloc_cmd_prefix ocloc)
67-
else()
68-
if(DEFINED NEO__IGC_LIBRARY_PATH)
69-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
70-
else()
71-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
72-
endif()
73-
endif()
74-
endif()
7564

7665
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
7766
add_custom_command(
7867
OUTPUT ${OUTPUT_FILES}
79-
COMMAND ${cloc_cmd_prefix} -q -file ${FILENAME} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -out_dir ${OUTPUTDIR} -options "$<JOIN:${__cloc__options__}, >"
68+
COMMAND ocloc -q -file ${FILENAME} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -out_dir ${OUTPUTDIR} -options "$<JOIN:${__cloc__options__}, >"
8069
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8170
DEPENDS ${builtin} ocloc copy_compiler_files
8271
)

opencl/source/scheduler/scheduler_binary.cmake

+1-12
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,12 @@ function(compile_kernel target gen_type platform_type kernel)
3333

3434
set(SCHEDULER_CPP "${OUTPUTDIR}/${BASENAME}_${family_name_with_type}.cpp")
3535

36-
if(NOT DEFINED cloc_cmd_prefix)
37-
if(WIN32)
38-
set(cloc_cmd_prefix ocloc)
39-
else()
40-
if(DEFINED NEO__IGC_LIBRARY_PATH)
41-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
42-
else()
43-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
44-
endif()
45-
endif()
46-
endif()
4736
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
4837
list(APPEND __cloc__options__ "-cl-std=CL2.0")
4938
list(APPEND __cloc__options__ "-cl-intel-disable-a64WA")
5039
add_custom_command(
5140
OUTPUT ${OUTPUTPATH}
52-
COMMAND ${cloc_cmd_prefix} -q -file ${kernel} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} -cl-intel-greater-than-4GB-buffer-required -${NEO_BITS} -out_dir ${OUTPUTDIR} -cpp_file -options "$<JOIN:${__cloc__options__}, >" -internal_options "-cl-intel-no-spill"
41+
COMMAND ocloc -q -file ${kernel} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} -cl-intel-greater-than-4GB-buffer-required -${NEO_BITS} -out_dir ${OUTPUTDIR} -cpp_file -options "$<JOIN:${__cloc__options__}, >" -internal_options "-cl-intel-no-spill"
5342
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
5443
DEPENDS ${kernel} ocloc copy_compiler_files
5544
)

opencl/test/unit_test/CMakeLists.txt

+5-17
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,6 @@ target_include_directories(igdrcl_tests BEFORE PRIVATE
176176
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/includes${BRANCH_DIR_SUFFIX}
177177
)
178178

179-
if(NOT DEFINED cloc_cmd_prefix)
180-
if(WIN32)
181-
set(cloc_cmd_prefix ocloc)
182-
else()
183-
if(DEFINED NEO__IGC_LIBRARY_PATH)
184-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
185-
else()
186-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
187-
endif()
188-
endif()
189-
endif()
190-
191179
function(neo_gen_kernels platform_name_with_type platform_name revision_id suffix)
192180
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
193181

@@ -207,7 +195,7 @@ function(neo_gen_kernels platform_name_with_type platform_name revision_id suffi
207195

208196
add_custom_command(
209197
OUTPUT ${output_files}
210-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir}
198+
COMMAND ocloc -q -file ${filename} -device ${platform_name} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir}
211199
WORKING_DIRECTORY ${workdir}
212200
DEPENDS ${filepath} ocloc
213201
)
@@ -253,7 +241,7 @@ function(neo_gen_kernels_with_options platform_name_with_type platform_name revi
253241

254242
add_custom_command(
255243
OUTPUT ${output_files}
256-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -options_name
244+
COMMAND ocloc -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -options_name
257245
WORKING_DIRECTORY ${workdir}
258246
DEPENDS ${filearg} ocloc
259247
)
@@ -305,7 +293,7 @@ function(neo_gen_kernels_with_internal_options platform_name_with_type platform_
305293

306294
add_custom_command(
307295
OUTPUT ${output_files}
308-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
296+
COMMAND ocloc -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
309297
WORKING_DIRECTORY ${workdir}
310298
DEPENDS ${filearg} ocloc
311299
)
@@ -351,7 +339,7 @@ function(neo_gen_kernel_with_kernel_debug_options platform_name_with_type platfo
351339
)
352340
add_custom_command(
353341
OUTPUT ${output_files}
354-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} -output ${argwospaces} -internal_options ${TEST_KERNEL_kernel_debug_enable} -options "-g"
342+
COMMAND ocloc -q -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} -output ${argwospaces} -internal_options ${TEST_KERNEL_kernel_debug_enable} -options "-g"
355343
WORKING_DIRECTORY ${workdir}
356344
DEPENDS ${filepath} ocloc
357345
)
@@ -387,7 +375,7 @@ function(neo_gen_kernel_from_ll platform_name_with_type platform_name suffix fil
387375

388376
add_custom_command(
389377
OUTPUT ${output_files}
390-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -output ${output_name} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -internal_options ${compile_options} -llvm_input
378+
COMMAND ocloc -q -file ${filename} -output ${output_name} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -internal_options ${compile_options} -llvm_input
391379
WORKING_DIRECTORY ${workdir}
392380
DEPENDS ${filepath} ocloc
393381
)

shared/offline_compiler/source/CMakeLists.txt

+29-30
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
# SPDX-License-Identifier: MIT
55
#
66

7-
project(${OCLOC_NAME}_lib)
7+
project(ocloc_lib)
88

9-
set(OCLOC_NAME "ocloc")
109
set(OCLOC_FOLDER_NAME "offline_compiler")
1110

1211
set(CLOC_LIB_SRCS_LIB
@@ -150,12 +149,12 @@ set(CLOC_LIB_SRCS
150149
${CLOC_LIB_SRCS_LIB}
151150
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
152151
)
153-
add_library(${OCLOC_NAME}_lib SHARED ${CLOC_LIB_SRCS})
152+
add_library(ocloc_lib SHARED ${CLOC_LIB_SRCS})
154153

155154
add_subdirectories()
156155

157-
create_project_source_tree(${OCLOC_NAME}_lib)
158-
set_target_properties(${OCLOC_NAME}_lib PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
156+
create_project_source_tree(ocloc_lib)
157+
set_target_properties(ocloc_lib PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
159158

160159
set(CLOC_LIB_INCLUDES
161160
${ENGINE_NODE_DIR}
@@ -166,20 +165,20 @@ set(CLOC_LIB_INCLUDES
166165
${NEO__IGC_INCLUDE_DIR}
167166
)
168167

169-
target_include_directories(${OCLOC_NAME}_lib BEFORE PRIVATE ${CLOC_LIB_INCLUDES})
170-
target_include_directories(${OCLOC_NAME}_lib BEFORE PRIVATE ${IGA_INCLUDE_DIR})
168+
target_include_directories(ocloc_lib BEFORE PRIVATE ${CLOC_LIB_INCLUDES})
169+
target_include_directories(ocloc_lib BEFORE PRIVATE ${IGA_INCLUDE_DIR})
171170

172-
target_compile_definitions(${OCLOC_NAME}_lib PUBLIC ${CLOC_LIB_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM}
171+
target_compile_definitions(ocloc_lib PUBLIC ${CLOC_LIB_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM}
173172
IGA_LIBRARY_NAME=${CMAKE_SHARED_LIBRARY_PREFIX}${IGA_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
174173
)
175-
target_compile_definitions(${OCLOC_NAME}_lib PUBLIC ${NEO__IGC_COMPILE_DEFINITIONS})
174+
target_compile_definitions(ocloc_lib PUBLIC ${NEO__IGC_COMPILE_DEFINITIONS})
176175

177176
if(MSVC)
178-
target_link_libraries(${OCLOC_NAME}_lib dbghelp)
177+
target_link_libraries(ocloc_lib dbghelp)
179178
endif()
180179

181180
if(UNIX)
182-
target_link_libraries(${OCLOC_NAME}_lib dl pthread)
181+
target_link_libraries(ocloc_lib dl pthread)
183182
endif()
184183

185184
set(CLOC_LIB_SRCS_LIB ${CLOC_LIB_SRCS_LIB} PARENT_SCOPE)
@@ -189,11 +188,11 @@ set(OCLOC_SRCS
189188
${OCLOC_DIRECTORY}/source/main.cpp
190189
)
191190

192-
add_executable(${OCLOC_NAME} ${OCLOC_SRCS})
193-
target_link_libraries(${OCLOC_NAME} ${OCLOC_NAME}_lib)
191+
add_executable(ocloc ${OCLOC_SRCS})
192+
target_link_libraries(ocloc ocloc_lib)
194193

195-
create_project_source_tree(${OCLOC_NAME})
196-
set_target_properties(${OCLOC_NAME} PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
194+
create_project_source_tree(ocloc)
195+
set_target_properties(ocloc PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
197196

198197
if(MSVC)
199198
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
@@ -207,42 +206,42 @@ endif()
207206

208207
if(UNIX)
209208
if(NEO_BUILD_DEBUG_SYMBOLS_PACKAGE)
210-
get_filename_component(lib_file_name $<TARGET_FILE:${OCLOC_NAME}_lib> NAME_WE)
209+
get_filename_component(lib_file_name $<TARGET_FILE:ocloc_lib> NAME_WE)
211210
set(symbols_file_name ${lib_file_name}.debug)
212-
set(debug_symbols_target_name "${STRIP_SYMBOLS_TARGET}_${OCLOC_NAME}_lib")
211+
set(debug_symbols_target_name "${STRIP_SYMBOLS_TARGET}_ocloc_lib")
213212
add_custom_target(${debug_symbols_target_name}
214213
COMMAND sh -c "objcopy --only-keep-debug ${lib_file_name} ${symbols_file_name}"
215214
COMMAND sh -c "strip -g ${lib_file_name}"
216215
COMMAND sh -c "objcopy --add-gnu-debuglink=${symbols_file_name} ${lib_file_name}"
217216
)
218-
add_dependencies(${debug_symbols_target_name} ${OCLOC_NAME}_lib)
217+
add_dependencies(${debug_symbols_target_name} ocloc_lib)
219218
add_dependencies(${STRIP_SYMBOLS_TARGET} ${debug_symbols_target_name})
220219
set_property(GLOBAL APPEND PROPERTY DEBUG_SYMBOL_FILES "${symbols_file_name}")
221220
endif()
222221

223-
set_property(GLOBAL APPEND PROPERTY NEO_OCL_COMPONENTS_LIST ${OCLOC_NAME})
224-
install(FILES $<TARGET_FILE:${OCLOC_NAME}>
222+
set_property(GLOBAL APPEND PROPERTY NEO_OCL_COMPONENTS_LIST ocloc)
223+
install(FILES $<TARGET_FILE:ocloc>
225224
DESTINATION ${CMAKE_INSTALL_BINDIR}
226225
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
227-
COMPONENT ${OCLOC_NAME}
226+
COMPONENT ocloc
228227
)
229-
install(FILES $<TARGET_FILE:${OCLOC_NAME}_lib>
228+
install(FILES $<TARGET_FILE:ocloc_lib>
230229
DESTINATION ${CMAKE_INSTALL_LIBDIR}
231230
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
232-
COMPONENT ${OCLOC_NAME}
231+
COMPONENT ocloc
233232
)
234233
install(FILES ${OCLOC_DIRECTORY}/source/ocloc_api.h
235234
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
236235
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
237-
COMPONENT ${OCLOC_NAME}
236+
COMPONENT ocloc
238237
)
239238
elseif(WIN32)
240239
if(NEO_WINDOWS_INSTALL)
241-
install(TARGETS ${OCLOC_NAME}
240+
install(TARGETS ocloc
242241
DESTINATION ${CMAKE_INSTALL_BINDIR}
243242
COMPONENT ocloc
244243
)
245-
install(TARGETS ${OCLOC_NAME}_lib
244+
install(TARGETS ocloc_lib
246245
DESTINATION ${CMAKE_INSTALL_LIBDIR}
247246
COMPONENT ocloc
248247
)
@@ -253,8 +252,8 @@ elseif(WIN32)
253252
endif()
254253
endif()
255254

256-
set(OCLOC_OUTPUT_NAME "${OCLOC_NAME}${OCLOC_BITNESS_SUFFIX}")
257-
set_target_properties(${OCLOC_NAME}_lib PROPERTIES OUTPUT_NAME ${OCLOC_OUTPUT_NAME})
255+
set(OCLOC_OUTPUT_NAME "ocloc${OCLOC_BITNESS_SUFFIX}")
256+
set_target_properties(ocloc_lib PROPERTIES OUTPUT_NAME ${OCLOC_OUTPUT_NAME})
258257

259258
add_custom_target(copy_compiler_files DEPENDS ${NEO__IGC_TARGETS})
260259
set_target_properties(copy_compiler_files PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
@@ -264,8 +263,8 @@ if(WIN32)
264263
add_custom_command(
265264
TARGET copy_compiler_files
266265
PRE_BUILD
267-
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${OCLOC_NAME}_lib>
268-
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:${OCLOC_NAME}_lib>
266+
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:ocloc_lib>
267+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc_lib>
269268
)
270269
endforeach()
271270
endif()

shared/source/built_ins/kernels/CMakeLists.txt

+3-26
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,11 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
6464
${OUTPUTDIR}/${mode}_${BASENAME}_${family_name_with_type}.spv
6565
)
6666

67-
if(NOT DEFINED cloc_cmd_prefix)
68-
if(WIN32)
69-
set(cloc_cmd_prefix ocloc)
70-
else()
71-
if(DEFINED NEO__IGC_LIBRARY_PATH)
72-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
73-
else()
74-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
75-
endif()
76-
endif()
77-
endif()
7867
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
7968
set(INTERNAL_OPTIONS "${${mode}_OPTIONS}")
8069
add_custom_command(
8170
OUTPUT ${OUTPUT_FILE_SPV}
82-
COMMAND ${cloc_cmd_prefix} -q -file ${FILENAME} -spv_only -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -output ${mode}_${BASENAME} -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__cloc__options__}, >"
71+
COMMAND ocloc -q -file ${FILENAME} -spv_only -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -output ${mode}_${BASENAME} -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__cloc__options__}, >"
8372
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8473
DEPENDS ${builtin} ocloc copy_compiler_files
8574
)
@@ -95,7 +84,7 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
9584
list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}")
9685
add_custom_command(
9786
OUTPUT ${OUTPUT_FILES_BINARIES}
98-
COMMAND ${cloc_cmd_prefix} -q -file ${OUTPUT_FILE_SPV} -spirv_input -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -output ${mode}_${BASENAME}_${REVISION_ID} -out_dir ${OUTPUTDIR} -revision_id ${REVISION_ID} ${INTERNAL_OPTIONS} -options "$<JOIN:${__cloc__options__}, >"
87+
COMMAND ocloc -q -file ${OUTPUT_FILE_SPV} -spirv_input -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -output ${mode}_${BASENAME}_${REVISION_ID} -out_dir ${OUTPUTDIR} -revision_id ${REVISION_ID} ${INTERNAL_OPTIONS} -options "$<JOIN:${__cloc__options__}, >"
9988
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
10089
DEPENDS ${OUTPUT_FILE_SPV} ocloc copy_compiler_files
10190
)
@@ -110,18 +99,6 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
11099
endfunction()
111100

112101
function(generate_cpp_spirv builtin)
113-
if(NOT DEFINED cloc_cmd_prefix)
114-
if(WIN32)
115-
set(cloc_cmd_prefix $<TARGET_FILE:ocloc>)
116-
else()
117-
if(DEFINED NEO__IGC_LIBRARY_PATH)
118-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
119-
else()
120-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
121-
endif()
122-
endif()
123-
endif()
124-
125102
get_filename_component(BASENAME ${builtin} NAME_WE)
126103
get_filename_component(DIR ${builtin} DIRECTORY)
127104

@@ -139,7 +116,7 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
139116
set(OUTPUT_LIST_CPP_FILES ${OUTPUT_LIST_CPP_FILES} ${OUTPUT_FILE_CPP} PARENT_SCOPE)
140117
add_custom_command(
141118
OUTPUT ${GENERATED_SPV_INPUT}
142-
COMMAND ${cloc_cmd_prefix} -q -spv_only -file ${INPUT_FILENAME} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
119+
COMMAND ocloc -q -spv_only -file ${INPUT_FILENAME} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
143120
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
144121
DEPENDS ${INPUT_FILENAME} ocloc copy_compiler_files
145122
)

shared/test/common/test_files/CMakeLists.txt

+1-12
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@
55
#
66

77
set(SHARED_TEST_PROJECTS_SUB_FOLDER "prepare test files")
8-
if(NOT DEFINED cloc_cmd_prefix)
9-
if(WIN32)
10-
set(cloc_cmd_prefix ocloc)
11-
else()
12-
if(DEFINED NEO__IGC_LIBRARY_PATH)
13-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
14-
else()
15-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
16-
endif()
17-
endif()
18-
endif()
198

209
function(compile_kernels_gen platform_name_with_type revision_id platform_name suffix)
2110

@@ -38,7 +27,7 @@ function(compile_kernels_gen platform_name_with_type revision_id platform_name s
3827

3928
add_custom_command(
4029
OUTPUT ${output_files}
41-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id}
30+
COMMAND ocloc -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id}
4231
WORKING_DIRECTORY ${workdir}
4332
DEPENDS ${filepath} ocloc copy_compiler_files
4433
)

0 commit comments

Comments
 (0)