Skip to content

Commit c5569cf

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 11980db commit c5569cf

File tree

7 files changed

+42
-123
lines changed

7 files changed

+42
-123
lines changed

level_zero/core/test/unit_tests/gen_kernel.cmake

+2-14
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66

77
function(level_zero_gen_kernels target platform_name suffix options)
88

9-
if(NOT DEFINED cloc_cmd_prefix)
10-
if(WIN32)
11-
set(cloc_cmd_prefix ocloc)
12-
else()
13-
if(DEFINED NEO__IGC_LIBRARY_PATH)
14-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
15-
else()
16-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
17-
endif()
18-
endif()
19-
endif()
20-
219
set(outputdir "${TargetDir}/level_zero/${suffix}/test_files/${NEO_ARCH}/")
2210

2311
set(results)
@@ -34,9 +22,9 @@ function(level_zero_gen_kernels target platform_name suffix options)
3422
)
3523

3624
add_custom_command(
37-
COMMAND echo generate ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -out_dir ${outputdir} -options "${options}"
25+
COMMAND echo generate ocloc -q -file ${filename} -device ${platform_name} -out_dir ${outputdir} -options "${options}"
3826
OUTPUT ${output_files}
39-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -out_dir ${outputdir} -options "${options}"
27+
COMMAND ocloc -q -file ${filename} -device ${platform_name} -out_dir ${outputdir} -options "${options}"
4028
WORKING_DIRECTORY ${workdir}
4129
DEPENDS ${filepath} ocloc
4230
)

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
@@ -194,18 +194,6 @@ target_include_directories(igdrcl_tests BEFORE PRIVATE
194194
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/includes${BRANCH_DIR_SUFFIX}
195195
)
196196

197-
if(NOT DEFINED cloc_cmd_prefix)
198-
if(WIN32)
199-
set(cloc_cmd_prefix ocloc)
200-
else()
201-
if(DEFINED NEO__IGC_LIBRARY_PATH)
202-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
203-
else()
204-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
205-
endif()
206-
endif()
207-
endif()
208-
209197
function(neo_gen_kernels platform_name_with_type platform_name revision_id suffix)
210198
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
211199

@@ -224,7 +212,7 @@ function(neo_gen_kernels platform_name_with_type platform_name revision_id suffi
224212

225213
add_custom_command(
226214
OUTPUT ${output_files}
227-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir}
215+
COMMAND ocloc -q -file ${filename} -device ${platform_name} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir}
228216
WORKING_DIRECTORY ${workdir}
229217
DEPENDS ${filepath} ocloc
230218
)
@@ -257,7 +245,7 @@ function(neo_gen_kernels_with_options platform_name_with_type platform_name revi
257245

258246
add_custom_command(
259247
OUTPUT ${output_files}
260-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -options_name
248+
COMMAND ocloc -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -options_name
261249
WORKING_DIRECTORY ${workdir}
262250
DEPENDS ${filearg} ocloc
263251
)
@@ -296,7 +284,7 @@ function(neo_gen_kernels_with_internal_options platform_name_with_type platform_
296284

297285
add_custom_command(
298286
OUTPUT ${output_files}
299-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
287+
COMMAND ocloc -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
300288
WORKING_DIRECTORY ${workdir}
301289
DEPENDS ${filearg} ocloc
302290
)
@@ -330,7 +318,7 @@ function(neo_gen_kernel_with_kernel_debug_options platform_name_with_type platfo
330318

331319
add_custom_command(
332320
OUTPUT ${output_files}
333-
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"
321+
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"
334322
WORKING_DIRECTORY ${workdir}
335323
DEPENDS ${filepath} ocloc
336324
)
@@ -355,7 +343,7 @@ function(neo_gen_kernel_from_ll platform_name_with_type platform_name suffix fil
355343

356344
add_custom_command(
357345
OUTPUT ${output_files}
358-
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -output ${output_name} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -internal_options ${compile_options} -llvm_input
346+
COMMAND ocloc -q -file ${filename} -output ${output_name} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -internal_options ${compile_options} -llvm_input
359347
WORKING_DIRECTORY ${workdir}
360348
DEPENDS ${filepath} ocloc
361349
)

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
@@ -146,12 +145,12 @@ set(CLOC_LIB_SRCS
146145
${CLOC_LIB_SRCS_LIB}
147146
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
148147
)
149-
add_library(${OCLOC_NAME}_lib SHARED ${CLOC_LIB_SRCS})
148+
add_library(ocloc_lib SHARED ${CLOC_LIB_SRCS})
150149

151150
add_subdirectories()
152151

153-
create_project_source_tree(${OCLOC_NAME}_lib)
154-
set_target_properties(${OCLOC_NAME}_lib PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
152+
create_project_source_tree(ocloc_lib)
153+
set_target_properties(ocloc_lib PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
155154

156155
set(CLOC_LIB_INCLUDES
157156
${ENGINE_NODE_DIR}
@@ -162,20 +161,20 @@ set(CLOC_LIB_INCLUDES
162161
${NEO__IGC_INCLUDE_DIR}
163162
)
164163

165-
target_include_directories(${OCLOC_NAME}_lib BEFORE PRIVATE ${CLOC_LIB_INCLUDES})
166-
target_include_directories(${OCLOC_NAME}_lib BEFORE PRIVATE ${IGA_INCLUDE_DIR})
164+
target_include_directories(ocloc_lib BEFORE PRIVATE ${CLOC_LIB_INCLUDES})
165+
target_include_directories(ocloc_lib BEFORE PRIVATE ${IGA_INCLUDE_DIR})
167166

168-
target_compile_definitions(${OCLOC_NAME}_lib PUBLIC ${CLOC_LIB_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM}
167+
target_compile_definitions(ocloc_lib PUBLIC ${CLOC_LIB_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM}
169168
IGA_LIBRARY_NAME=${CMAKE_SHARED_LIBRARY_PREFIX}${IGA_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
170169
)
171-
target_compile_definitions(${OCLOC_NAME}_lib PUBLIC ${NEO__IGC_COMPILE_DEFINITIONS})
170+
target_compile_definitions(ocloc_lib PUBLIC ${NEO__IGC_COMPILE_DEFINITIONS})
172171

173172
if(MSVC)
174-
target_link_libraries(${OCLOC_NAME}_lib dbghelp)
173+
target_link_libraries(ocloc_lib dbghelp)
175174
endif()
176175

177176
if(UNIX)
178-
target_link_libraries(${OCLOC_NAME}_lib dl pthread)
177+
target_link_libraries(ocloc_lib dl pthread)
179178
endif()
180179

181180
set(CLOC_LIB_SRCS_LIB ${CLOC_LIB_SRCS_LIB} PARENT_SCOPE)
@@ -185,11 +184,11 @@ set(OCLOC_SRCS
185184
${OCLOC_DIRECTORY}/source/main.cpp
186185
)
187186

188-
add_executable(${OCLOC_NAME} ${OCLOC_SRCS})
189-
target_link_libraries(${OCLOC_NAME} ${OCLOC_NAME}_lib)
187+
add_executable(ocloc ${OCLOC_SRCS})
188+
target_link_libraries(ocloc ocloc_lib)
190189

191-
create_project_source_tree(${OCLOC_NAME})
192-
set_target_properties(${OCLOC_NAME} PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
190+
create_project_source_tree(ocloc)
191+
set_target_properties(ocloc PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
193192

194193
if(MSVC)
195194
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
@@ -203,42 +202,42 @@ endif()
203202

204203
if(UNIX)
205204
if(NEO_BUILD_DEBUG_SYMBOLS_PACKAGE)
206-
get_filename_component(lib_file_name $<TARGET_FILE:${OCLOC_NAME}_lib> NAME_WE)
205+
get_filename_component(lib_file_name $<TARGET_FILE:ocloc_lib> NAME_WE)
207206
set(symbols_file_name ${lib_file_name}.debug)
208-
set(debug_symbols_target_name "${STRIP_SYMBOLS_TARGET}_${OCLOC_NAME}_lib")
207+
set(debug_symbols_target_name "${STRIP_SYMBOLS_TARGET}_ocloc_lib")
209208
add_custom_target(${debug_symbols_target_name}
210209
COMMAND sh -c "objcopy --only-keep-debug ${lib_file_name} ${symbols_file_name}"
211210
COMMAND sh -c "strip -g ${lib_file_name}"
212211
COMMAND sh -c "objcopy --add-gnu-debuglink=${symbols_file_name} ${lib_file_name}"
213212
)
214-
add_dependencies(${debug_symbols_target_name} ${OCLOC_NAME}_lib)
213+
add_dependencies(${debug_symbols_target_name} ocloc_lib)
215214
add_dependencies(${STRIP_SYMBOLS_TARGET} ${debug_symbols_target_name})
216215
set_property(GLOBAL APPEND PROPERTY DEBUG_SYMBOL_FILES "${symbols_file_name}")
217216
endif()
218217

219-
set_property(GLOBAL APPEND PROPERTY NEO_OCL_COMPONENTS_LIST ${OCLOC_NAME})
220-
install(FILES $<TARGET_FILE:${OCLOC_NAME}>
218+
set_property(GLOBAL APPEND PROPERTY NEO_OCL_COMPONENTS_LIST ocloc)
219+
install(FILES $<TARGET_FILE:ocloc>
221220
DESTINATION ${CMAKE_INSTALL_BINDIR}
222221
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
223-
COMPONENT ${OCLOC_NAME}
222+
COMPONENT ocloc
224223
)
225-
install(FILES $<TARGET_FILE:${OCLOC_NAME}_lib>
224+
install(FILES $<TARGET_FILE:ocloc_lib>
226225
DESTINATION ${CMAKE_INSTALL_LIBDIR}
227226
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
228-
COMPONENT ${OCLOC_NAME}
227+
COMPONENT ocloc
229228
)
230229
install(FILES ${OCLOC_DIRECTORY}/source/ocloc_api.h
231230
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
232231
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
233-
COMPONENT ${OCLOC_NAME}
232+
COMPONENT ocloc
234233
)
235234
elseif(WIN32)
236235
if(NEO_WINDOWS_INSTALL)
237-
install(TARGETS ${OCLOC_NAME}
236+
install(TARGETS ocloc
238237
DESTINATION ${CMAKE_INSTALL_BINDIR}
239238
COMPONENT ocloc
240239
)
241-
install(TARGETS ${OCLOC_NAME}_lib
240+
install(TARGETS ocloc_lib
242241
DESTINATION ${CMAKE_INSTALL_LIBDIR}
243242
COMPONENT ocloc
244243
)
@@ -249,8 +248,8 @@ elseif(WIN32)
249248
endif()
250249
endif()
251250

252-
set(OCLOC_OUTPUT_NAME "${OCLOC_NAME}${OCLOC_BITNESS_SUFFIX}")
253-
set_target_properties(${OCLOC_NAME}_lib PROPERTIES OUTPUT_NAME ${OCLOC_OUTPUT_NAME})
251+
set(OCLOC_OUTPUT_NAME "ocloc${OCLOC_BITNESS_SUFFIX}")
252+
set_target_properties(ocloc_lib PROPERTIES OUTPUT_NAME ${OCLOC_OUTPUT_NAME})
254253

255254
add_custom_target(copy_compiler_files DEPENDS ${NEO__IGC_TARGETS})
256255
set_target_properties(copy_compiler_files PROPERTIES FOLDER ${OCLOC_FOLDER_NAME})
@@ -260,8 +259,8 @@ if(WIN32)
260259
add_custom_command(
261260
TARGET copy_compiler_files
262261
PRE_BUILD
263-
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${OCLOC_NAME}_lib>
264-
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:${OCLOC_NAME}_lib>
262+
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:ocloc_lib>
263+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc_lib>
265264
)
266265
endforeach()
267266
endif()

shared/source/built_ins/kernels/CMakeLists.txt

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

66-
if(NOT DEFINED cloc_cmd_prefix)
67-
if(WIN32)
68-
set(cloc_cmd_prefix ocloc)
69-
else()
70-
if(DEFINED NEO__IGC_LIBRARY_PATH)
71-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
72-
else()
73-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
74-
endif()
75-
endif()
76-
endif()
7766
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
7867
set(INTERNAL_OPTIONS "${${mode}_OPTIONS}")
7968
add_custom_command(
8069
OUTPUT ${OUTPUT_FILE_SPV}
81-
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__}, >"
70+
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__}, >"
8271
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8372
DEPENDS ${builtin} ocloc copy_compiler_files
8473
)
@@ -94,7 +83,7 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
9483
list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}")
9584
add_custom_command(
9685
OUTPUT ${OUTPUT_FILES_BINARIES}
97-
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__}, >"
86+
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__}, >"
9887
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
9988
DEPENDS ${OUTPUT_FILE_SPV} ocloc copy_compiler_files
10089
)
@@ -109,18 +98,6 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
10998
endfunction()
11099

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

@@ -138,7 +115,7 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
138115
set(OUTPUT_LIST_CPP_FILES ${OUTPUT_LIST_CPP_FILES} ${OUTPUT_FILE_CPP} PARENT_SCOPE)
139116
add_custom_command(
140117
OUTPUT ${GENERATED_SPV_INPUT}
141-
COMMAND ${cloc_cmd_prefix} -q -spv_only -file ${INPUT_FILENAME} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
118+
COMMAND ocloc -q -spv_only -file ${INPUT_FILENAME} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
142119
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
143120
DEPENDS ${INPUT_FILENAME} ocloc copy_compiler_files
144121
)

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

@@ -37,7 +26,7 @@ function(compile_kernels_gen platform_name_with_type revision_id platform_name s
3726

3827
add_custom_command(
3928
OUTPUT ${output_files}
40-
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id}
29+
COMMAND ocloc -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id}
4130
WORKING_DIRECTORY ${workdir}
4231
DEPENDS ${filepath} ocloc copy_compiler_files
4332
)

0 commit comments

Comments
 (0)