Optionally able to provide external ocl offline compiler

Change-Id: I53a08c61ed38ccdf8c402afe04ee1d7b7ac98f8f
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
This commit is contained in:
Dongwon Kim 2020-03-13 13:58:39 -07:00 committed by sys_ocldev
parent 7c1f9173ce
commit af78548e80
3 changed files with 25 additions and 18 deletions

View File

@ -60,6 +60,7 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options)
unset(BUILTIN_CPP) unset(BUILTIN_CPP)
# set variable outside function # set variable outside function
set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE) set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE)
if(NOT DEFINED cloc_cmd_prefix)
if(WIN32) if(WIN32)
set(cloc_cmd_prefix ocloc) set(cloc_cmd_prefix ocloc)
else() else()
@ -69,6 +70,7 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options)
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
endif() endif()
endif() endif()
endif()
list(APPEND __cloc__options__ "-cl-kernel-arg-info") list(APPEND __cloc__options__ "-cl-kernel-arg-info")
add_custom_command( add_custom_command(

View File

@ -202,6 +202,7 @@ set_target_properties(run_unit_tests PROPERTIES FOLDER ${OPENCL_TEST_PROJECTS_FO
target_include_directories(igdrcl_tests BEFORE PRIVATE ${NEO_SHARED_TEST_DIRECTORY}/unit_test/test_macros${BRANCH_DIR_SUFFIX}) target_include_directories(igdrcl_tests BEFORE PRIVATE ${NEO_SHARED_TEST_DIRECTORY}/unit_test/test_macros${BRANCH_DIR_SUFFIX})
if(NOT DEFINED cloc_cmd_prefix)
if(WIN32) if(WIN32)
set(cloc_cmd_prefix ocloc) set(cloc_cmd_prefix ocloc)
else() else()
@ -211,6 +212,7 @@ else()
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
endif() endif()
endif() endif()
endif()
function(neo_gen_kernels platform_name_with_type platform_name suffix) function(neo_gen_kernels platform_name_with_type platform_name suffix)
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/") set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")

View File

@ -60,6 +60,7 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options)
unset(BUILTIN_CPP) unset(BUILTIN_CPP)
# set variable outside function # set variable outside function
set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE) set(BUILTIN_CPP built_ins/${NEO_ARCH}/${gen_type_lower}/${BASENAME}_${family_name_with_type}.cpp PARENT_SCOPE)
if(NOT DEFINED cloc_cmd_prefix)
if(WIN32) if(WIN32)
set(cloc_cmd_prefix ocloc) set(cloc_cmd_prefix ocloc)
else() else()
@ -69,6 +70,8 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options)
set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>) set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
endif() endif()
endif() endif()
endif()
list(APPEND __cloc__options__ "-cl-kernel-arg-info") list(APPEND __cloc__options__ "-cl-kernel-arg-info")
add_custom_command( add_custom_command(
OUTPUT ${OUTPUT_FILES} OUTPUT ${OUTPUT_FILES}