Skip to content

Commit d46969a

Browse files
Rename offline compiler: cloc -> ocloc
Change-Id: I0595bac4c7266e77bd2ee17588694233547c8315
1 parent af46d88 commit d46969a

File tree

13 files changed

+99
-99
lines changed

13 files changed

+99
-99
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ else()
613613
endif(MSVC)
614614

615615
add_subdirectory(offline_compiler ${IGDRCL_BUILD_DIR}/offline_compiler)
616-
target_compile_definitions(cloc PRIVATE MOCKABLE_VIRTUAL=)
616+
target_compile_definitions(ocloc PRIVATE MOCKABLE_VIRTUAL=)
617617

618618
macro(generate_runtime_lib LIB_NAME MOCKABLE GENERATE_EXEC)
619619
set(NEO_STATIC_LIB_NAME ${LIB_NAME})

offline_compiler/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: MIT
55
#
66

7-
project(cloc)
7+
project(ocloc)
88

99
set(CLOC_SRCS_LIB
1010
${IGDRCL_SOURCE_DIR}/offline_compiler/decoder/binary_decoder.cpp
@@ -69,10 +69,10 @@ set(CLOC_SRCS
6969
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
7070
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
7171
)
72-
add_executable(cloc ${CLOC_SRCS})
72+
add_executable(ocloc ${CLOC_SRCS})
7373
add_subdirectories()
7474

75-
create_project_source_tree(cloc ${IGDRCL_SOURCE_DIR}/runtime)
75+
create_project_source_tree(ocloc ${IGDRCL_SOURCE_DIR}/runtime)
7676

7777
set(CLOC_INCLUDES
7878
${IGC_OCL_ADAPTOR_DIR}
@@ -85,22 +85,22 @@ set(CLOC_INCLUDES
8585
${THIRD_PARTY_DIR}
8686
)
8787

88-
target_include_directories(cloc BEFORE PRIVATE ${CLOC_INCLUDES})
88+
target_include_directories(ocloc BEFORE PRIVATE ${CLOC_INCLUDES})
8989

90-
target_compile_definitions(cloc PUBLIC ${CLOC_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM})
90+
target_compile_definitions(ocloc PUBLIC ${CLOC_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM})
9191

9292
if(MSVC)
93-
target_link_libraries(cloc dbghelp)
93+
target_link_libraries(ocloc dbghelp)
9494
endif()
9595

9696
if(UNIX)
97-
target_link_libraries(cloc dl pthread)
97+
target_link_libraries(ocloc dl pthread)
9898
endif()
9999

100-
target_link_libraries(cloc elflib)
100+
target_link_libraries(ocloc elflib)
101101

102-
set_target_properties(cloc PROPERTIES FOLDER "offline_compiler")
103-
set_property(TARGET cloc APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
102+
set_target_properties(ocloc PROPERTIES FOLDER "offline_compiler")
103+
set_property(TARGET ocloc APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
104104

105105
add_custom_target(copy_compiler_files DEPENDS ${IGDRCL__IGC_TARGETS})
106106
set_target_properties(copy_compiler_files PROPERTIES FOLDER "opencl runtime")
@@ -109,7 +109,7 @@ foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
109109
add_custom_command(
110110
TARGET copy_compiler_files
111111
PRE_BUILD
112-
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:cloc>
112+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc>
113113
)
114114
endforeach()
115115

offline_compiler/offline_compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ std::string getDevicesTypes() {
620620
void OfflineCompiler::printUsage() {
621621

622622
printf("Compiles CL files into llvm (.bc or .ll), gen isa (.gen), and binary files (.bin)\n\n");
623-
printf("cloc -file <filename> -device <device_type> [OPTIONS]\n\n");
623+
printf("ocloc -file <filename> -device <device_type> [OPTIONS]\n\n");
624624
printf(" -file <filename> Indicates the CL kernel file to be compiled.\n");
625625
printf(" -device <device_type> Indicates which device for which we will compile.\n");
626626
printf(" <device_type> can be: %s\n", getDevicesTypes().c_str());

offline_compiler/utilities/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ else()
2222
)
2323
endif()
2424

25-
target_sources(cloc PRIVATE ${CLOC_SRCS_UTILITIES})
25+
target_sources(ocloc PRIVATE ${CLOC_SRCS_UTILITIES})

runtime/built_ins/kernels/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ endif()
2222
set(BUILTINS_INCLUDE_DIR ${TargetDir} PARENT_SCOPE)
2323
set(BUILTIN_CPP "")
2424

25-
# Define function for compiling built-ins (with cloc)
25+
# Define function for compiling built-ins (with ocloc)
2626
function(compile_builtin gen_type platform_type builtin)
2727
string(TOLOWER ${gen_type} gen_type_lower)
2828
get_family_name_with_type(${gen_type} ${platform_type})
@@ -51,20 +51,20 @@ function(compile_builtin gen_type platform_type builtin)
5151
# set variable outside function
5252
set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE)
5353
if(WIN32)
54-
set(cloc_cmd_prefix cloc)
54+
set(cloc_cmd_prefix ocloc)
5555
else()
5656
if(DEFINED IGDRCL__IGC_LIBRARY_PATH)
57-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:cloc>)
57+
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>)
5858
else()
59-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:cloc> $<TARGET_FILE:cloc>)
59+
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>)
6060
endif()
6161
endif()
6262
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
6363
add_custom_command(
6464
OUTPUT ${OUTPUT_FILES}
6565
COMMAND ${cloc_cmd_prefix} -q -file ${FILENAME} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${BUILTIN_OPTIONS} -${NEO_BITS} -out_dir ${OUTPUTDIR} -cpp_file -options "$<JOIN:${__cloc__options__}, >"
6666
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
67-
DEPENDS ${builtin} cloc copy_compiler_files
67+
DEPENDS ${builtin} ocloc copy_compiler_files
6868
)
6969
endfunction()
7070

runtime/scheduler/scheduler_binary.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ function(compile_kernel target gen_type platform_type kernel)
3232

3333
set(SCHEDULER_CPP "${OUTPUTDIR}/${BASENAME}_${family_name_with_type}.cpp")
3434
if(WIN32)
35-
set(cloc_cmd_prefix cloc)
35+
set(cloc_cmd_prefix ocloc)
3636
else()
3737
if(DEFINED IGDRCL__IGC_LIBRARY_PATH)
38-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:cloc>)
38+
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>)
3939
else()
40-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:cloc> $<TARGET_FILE:cloc>)
40+
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>)
4141
endif()
4242
endif()
4343
list(APPEND __cloc__options__ "-cl-kernel-arg-info")
@@ -46,7 +46,7 @@ function(compile_kernel target gen_type platform_type kernel)
4646
OUTPUT ${OUTPUTPATH}
4747
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__}, >"
4848
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
49-
DEPENDS ${kernel} cloc copy_compiler_files
49+
DEPENDS ${kernel} ocloc copy_compiler_files
5050
)
5151
set(SCHEDULER_CPP ${SCHEDULER_CPP} PARENT_SCOPE)
5252

ubsan.supp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
vptr:std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()
2-
vptr:cloc
2+
vptr:ocloc

unit_tests/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ set_target_properties(run_unit_tests PROPERTIES FOLDER ${TEST_PROJECTS_FOLDER})
162162
target_include_directories(igdrcl_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common${BRANCH_DIR_SUFFIX})
163163

164164
if(WIN32)
165-
set(cloc_cmd_prefix cloc)
165+
set(cloc_cmd_prefix ocloc)
166166
set(ir_extension ".spv")
167167
else()
168168
if(DEFINED IGDRCL__IGC_LIBRARY_PATH)
169-
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:cloc>)
169+
set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>)
170170
else()
171-
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:cloc> $<TARGET_FILE:cloc>)
171+
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>)
172172
endif()
173173
set(ir_extension ".bc")
174174
endif()
@@ -193,7 +193,7 @@ function(neo_gen_kernels target platform_name suffix)
193193
OUTPUT ${output_files}
194194
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir}
195195
WORKING_DIRECTORY ${workdir}
196-
DEPENDS ${filepath} cloc
196+
DEPENDS ${filepath} ocloc
197197
)
198198

199199
list(APPEND results ${output_files})
@@ -226,7 +226,7 @@ function(neo_gen_kernels_with_options target platform_name suffix filepath)
226226
OUTPUT ${output_files}
227227
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -options ${arg} -options_name
228228
WORKING_DIRECTORY ${workdir}
229-
DEPENDS ${filearg} cloc
229+
DEPENDS ${filearg} ocloc
230230
)
231231

232232
list(APPEND results ${output_files})
@@ -263,7 +263,7 @@ function(neo_gen_kernel_with_kernel_debug_options target platform_name suffix fi
263263
OUTPUT ${output_files}
264264
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -output ${argwospaces} -internal_options ${TEST_KERNEL_kernel_debug_enable} -options "-g"
265265
WORKING_DIRECTORY ${workdir}
266-
DEPENDS ${filepath} cloc
266+
DEPENDS ${filepath} ocloc
267267
)
268268

269269
list(APPEND results ${output_files})
@@ -290,7 +290,7 @@ function(neo_gen_kernel_from_ll target platform_name suffix filepath output_name
290290
OUTPUT ${output_files}
291291
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -output ${output_name} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -internal_options ${compile_options} -llvm_input
292292
WORKING_DIRECTORY ${workdir}
293-
DEPENDS ${filepath} cloc
293+
DEPENDS ${filepath} ocloc
294294
)
295295

296296
list(APPEND results ${output_files})

unit_tests/offline_compiler/CMakeLists.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: MIT
55
#
66

7-
project(cloc_tests)
7+
project(ocloc_tests)
88

99
set(IGDRCL_SRCS_cloc
1010
${IGDRCL_SOURCE_DIR}/offline_compiler/decoder/binary_decoder.cpp
@@ -48,38 +48,38 @@ endif()
4848

4949
link_directories(${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
5050

51-
add_executable(cloc_tests ${IGDRCL_SRCS_offline_compiler_tests})
51+
add_executable(ocloc_tests ${IGDRCL_SRCS_offline_compiler_tests})
5252

53-
target_include_directories(cloc_tests PRIVATE
54-
$<TARGET_PROPERTY:cloc,INCLUDE_DIRECTORIES>
53+
target_include_directories(ocloc_tests PRIVATE
54+
$<TARGET_PROPERTY:ocloc,INCLUDE_DIRECTORIES>
5555
)
56-
target_compile_definitions(cloc_tests PUBLIC MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:cloc,INTERFACE_COMPILE_DEFINITIONS>)
56+
target_compile_definitions(ocloc_tests PUBLIC MOCKABLE_VIRTUAL=virtual $<TARGET_PROPERTY:ocloc,INTERFACE_COMPILE_DEFINITIONS>)
5757

58-
target_link_libraries(cloc_tests igdrcl_mocks gmock-gtest elflib)
58+
target_link_libraries(ocloc_tests igdrcl_mocks gmock-gtest elflib)
5959

6060
if(UNIX)
61-
target_link_libraries(cloc_tests dl pthread)
61+
target_link_libraries(ocloc_tests dl pthread)
6262
endif()
6363

64-
get_property(CLOC_FOLDER TARGET cloc PROPERTY FOLDER)
65-
get_property(CLOC_COMPILE_FLAGS TARGET cloc PROPERTY COMPILE_FLAGS)
66-
set_property(TARGET cloc_tests PROPERTY FOLDER ${CLOC_FOLDER})
67-
set_property(TARGET cloc_tests APPEND_STRING PROPERTY COMPILE_FLAGS ${CLOC_COMPILE_FLAGS})
64+
get_property(CLOC_FOLDER TARGET ocloc PROPERTY FOLDER)
65+
get_property(CLOC_COMPILE_FLAGS TARGET ocloc PROPERTY COMPILE_FLAGS)
66+
set_property(TARGET ocloc_tests PROPERTY FOLDER ${CLOC_FOLDER})
67+
set_property(TARGET ocloc_tests APPEND_STRING PROPERTY COMPILE_FLAGS ${CLOC_COMPILE_FLAGS})
6868

6969
string(TOLOWER ${DEFAULT_TESTED_PLATFORM} CLOC_DEFAULT_DEVICE)
7070

71-
add_custom_target(run_cloc_tests ALL
72-
DEPENDS cloc_tests
71+
add_custom_target(run_ocloc_tests ALL
72+
DEPENDS ocloc_tests
7373
)
7474
macro(macro_for_each_platform)
7575
if("${PLATFORM_IT_LOWER}" STREQUAL "${CLOC_DEFAULT_DEVICE}")
7676
foreach(PLATFORM_TYPE "CORE" "LP")
7777
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
7878
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
79-
add_dependencies(run_cloc_tests test_kernels_${family_name_with_type})
79+
add_dependencies(run_ocloc_tests test_kernels_${family_name_with_type})
8080
neo_copy_test_files(copy_test_files_${family_name_with_type} ${family_name_with_type})
81-
add_dependencies(run_cloc_tests copy_test_files_${family_name_with_type})
82-
set(run_tests_cmd cloc_tests --device ${CLOC_DEFAULT_DEVICE} --family_type ${family_name_with_type})
81+
add_dependencies(run_ocloc_tests copy_test_files_${family_name_with_type})
82+
set(run_tests_cmd ocloc_tests --device ${CLOC_DEFAULT_DEVICE} --family_type ${family_name_with_type})
8383
endif()
8484
endforeach()
8585
endif()
@@ -89,11 +89,11 @@ macro(macro_for_each_gen)
8989
endmacro()
9090
apply_macro_for_each_gen("TESTED")
9191

92-
set_property(TARGET run_cloc_tests PROPERTY FOLDER ${CLOC_FOLDER})
92+
set_property(TARGET run_ocloc_tests PROPERTY FOLDER ${CLOC_FOLDER})
9393

9494
if(WIN32)
9595
add_custom_command(
96-
TARGET run_cloc_tests
96+
TARGET run_ocloc_tests
9797
POST_BUILD
9898
COMMAND echo deleting offline compiler files and directories...
9999
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_DEFAULT_DEVICE}/copybuffer_${CLOC_DEFAULT_DEVICE}.bc
@@ -105,7 +105,7 @@ if(WIN32)
105105
)
106106
else()
107107
add_custom_command(
108-
TARGET run_cloc_tests
108+
TARGET run_ocloc_tests
109109
POST_BUILD
110110
COMMAND echo deleting offline compiler files and directories...
111111
COMMAND ${CMAKE_COMMAND} -E remove ${TargetDir}/${CLOC_DEFAULT_DEVICE}/*.bc
@@ -119,4 +119,4 @@ else()
119119
endif()
120120

121121
add_subdirectories()
122-
create_project_source_tree(cloc_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR}/unit_tests ${IGDRCL_SOURCE_DIR})
122+
create_project_source_tree(ocloc_tests ${IGDRCL_SOURCE_DIR}/runtime ${IGDRCL_SOURCE_DIR}/unit_tests ${IGDRCL_SOURCE_DIR})

unit_tests/offline_compiler/decoder/decoder_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SKernelBinaryHeaderCommon createKernelBinaryHeaderCommon(const uint32_t kernelNa
2929
namespace OCLRT {
3030
TEST(DecoderTests, WhenParsingValidListOfParametersThenReturnValueIsZero) {
3131
const char *argv[] = {
32-
"cloc",
32+
"ocloc",
3333
"decoder",
3434
"-file",
3535
"test_files/binary.bin",
@@ -44,7 +44,7 @@ TEST(DecoderTests, WhenParsingValidListOfParametersThenReturnValueIsZero) {
4444

4545
TEST(DecoderTests, WhenMissingParametersThenValidateInputReturnsErrorCode) {
4646
const char *argv[] = {
47-
"cloc",
47+
"ocloc",
4848
"decoder",
4949
"-file",
5050
"test_files/binary.bin",

0 commit comments

Comments
 (0)