From cd0ba51efdd23b817b903f3841d3dbabb9d23c72 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 5 Oct 2021 00:34:20 +0800 Subject: [PATCH] intel-compute-runtime: upgrade 21.33.20678 -> 21.37.20939 Disable built-ins compilation when building for native. Signed-off-by: Anuj Mittal --- ...-builtin-kernels-compilation-process.patch | 117 ------------------ .../allow-to-find-cpp-generation-tool.patch | 44 +++---- ...b => intel-compute-runtime_21.37.20939.bb} | 7 +- 3 files changed, 27 insertions(+), 141 deletions(-) delete mode 100644 dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-Revert-Change-builtin-kernels-compilation-process.patch rename dynamic-layers/clang-layer/recipes-opencl/compute-runtime/{intel-compute-runtime_21.33.20678.bb => intel-compute-runtime_21.37.20939.bb} (89%) diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-Revert-Change-builtin-kernels-compilation-process.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-Revert-Change-builtin-kernels-compilation-process.patch deleted file mode 100644 index ec3d3183..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-Revert-Change-builtin-kernels-compilation-process.patch +++ /dev/null @@ -1,117 +0,0 @@ -From f031f4d7ab4021c2b60391b3a957e75fac14c2e3 Mon Sep 17 00:00:00 2001 -From: Dongwon Kim -Date: Sat, 21 Aug 2021 11:27:59 -0700 -Subject: [PATCH] Revert "Change builtin kernels compilation process" - -This reverts commit ab52c702337358af57140e760d618549372e1cdd. -Upstream-Status: Pending -Signed-off-by: Dongwon Kim ---- - .../offline_compiler_tests.cpp | 23 ---------------- - .../source/offline_compiler.cpp | 2 +- - .../source/built_ins/kernels/CMakeLists.txt | 26 +++++++------------ - 3 files changed, 10 insertions(+), 41 deletions(-) - -diff --git a/opencl/test/unit_test/offline_compiler/offline_compiler_tests.cpp b/opencl/test/unit_test/offline_compiler/offline_compiler_tests.cpp -index 1427cd5cc..8b913d740 100644 ---- a/opencl/test/unit_test/offline_compiler/offline_compiler_tests.cpp -+++ b/opencl/test/unit_test/offline_compiler/offline_compiler_tests.cpp -@@ -1651,27 +1651,4 @@ TEST(OclocCompile, givenPackedDeviceBinaryFormatWhenGeneratingElfBinaryThenItIsR - ASSERT_EQ(true, ocloc.generateElfBinary()); - EXPECT_EQ(0, memcmp(zebin.storage.data(), ocloc.elfBinary.data(), zebin.storage.size())); - } -- --TEST(OclocCompile, givenSpirvInputThenDontGenerateSpirvFile) { -- MockOfflineCompiler ocloc; -- -- std::vector argv = { -- "ocloc", -- "-q", -- "-file", -- "test_files/binary_with_zeroes", -- "-out_dir", -- "offline_compiler_test", -- "-device", -- gEnvironment->devicePrefix.c_str(), -- "-spirv_input"}; -- -- int retVal = ocloc.initialize(argv.size(), argv); -- ASSERT_EQ(0, retVal); -- retVal = ocloc.build(); -- EXPECT_EQ(0, retVal); -- EXPECT_TRUE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "gen")); -- EXPECT_TRUE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "bin")); -- EXPECT_FALSE(compilerOutputExists("offline_compiler_test/binary_with_zeroes", "spv")); --} - } // namespace NEO -diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp -index 0ffc3bbca..aa02e0550 100644 ---- a/shared/offline_compiler/source/offline_compiler.cpp -+++ b/shared/offline_compiler/source/offline_compiler.cpp -@@ -1050,7 +1050,7 @@ void OfflineCompiler::writeOutAllFiles() { - } - } - -- if (irBinary && !inputFileSpirV) { -+ if (irBinary) { - std::string irOutputFileName = generateFilePathForIr(fileBase) + generateOptsSuffix(); - - argHelper->saveOutput(irOutputFileName, irBinary, irBinarySize); -diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt -index 59723fdb2..12dc4aa7a 100644 ---- a/shared/source/built_ins/kernels/CMakeLists.txt -+++ b/shared/source/built_ins/kernels/CMakeLists.txt -@@ -58,8 +58,11 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options mod - # get name of the file w/o extension - get_filename_component(BASENAME ${builtin} NAME_WE) - -- set(OUTPUT_FILE_SPV -- ${OUTPUTDIR}/${mode}_${BASENAME}_${family_name_with_type}.spv -+ set(OUTPUTPATH_BASE "${OUTPUTDIR}/${mode}_${BASENAME}_${family_name_with_type}") -+ set(OUTPUT_FILES -+ ${OUTPUTPATH_BASE}.spv -+ ${OUTPUTPATH_BASE}.bin -+ ${OUTPUTPATH_BASE}.gen - ) - - if(NOT DEFINED cloc_cmd_prefix) -@@ -76,8 +79,8 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options mod - list(APPEND __cloc__options__ "-cl-kernel-arg-info") - set(INTERNAL_OPTIONS "${${mode}_OPTIONS}") - add_custom_command( -- OUTPUT ${OUTPUT_FILE_SPV} -- 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 "$" -+ OUTPUT ${OUTPUT_FILES} -+ COMMAND ${cloc_cmd_prefix} -q -file ${FILENAME} -device ${DEFAULT_SUPPORTED_${gen_type}_${platform_type}_PLATFORM} ${builtin_options} -${bits} -output ${mode}_${BASENAME} -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${builtin} ocloc copy_compiler_files - ) -@@ -85,23 +88,12 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options mod - set(OUTPUT_FILE_CPP - ${OUTPUTDIR}/${mode}_${BASENAME}_${family_name_with_type}_${REVISION_ID}.cpp - ) -- set(BINARY_OUTPUT "${OUTPUTDIR}/${mode}_${BASENAME}_${REVISION_ID}_${family_name_with_type}") -- set(OUTPUT_FILES_BINARIES -- ${BINARY_OUTPUT}.gen -- ${BINARY_OUTPUT}.bin -- ) - list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}") -- add_custom_command( -- OUTPUT ${OUTPUT_FILES_BINARIES} -- 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 "$" -- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -- DEPENDS ${OUTPUT_FILE_SPV} ocloc copy_compiler_files -- ) - add_custom_command( - OUTPUT ${OUTPUT_FILE_CPP} -- COMMAND $ --file ${BINARY_OUTPUT}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} -+ COMMAND $ --file ${OUTPUTPATH_BASE}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -- DEPENDS ${OUTPUT_FILES_BINARIES} $ -+ DEPENDS ${OUTPUTPATH_BASE}.gen $ - ) - endforeach() - set(BUILTINS_COMMANDS ${BUILTINS_COMMANDS} PARENT_SCOPE) --- -2.20.1 - diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch index f580693d..456dc5cd 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch @@ -1,4 +1,4 @@ -From b5d0b22011dd0360ad92dcd34f69a2b6a9e0772f Mon Sep 17 00:00:00 2001 +From 47ae5d13ad021076f5a79f245e33bcb228b0a0da Mon Sep 17 00:00:00 2001 From: Dongwon Kim Date: Sat, 21 Aug 2021 16:09:39 -0700 Subject: [PATCH] Build not able to locate cpp_generation_tool. @@ -12,33 +12,33 @@ Signed-off-by: Dongwon Kim 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt -index 12dc4aa7a..9e42d7a34 100644 +index 929b981fe..57cd3d4b3 100644 --- a/shared/source/built_ins/kernels/CMakeLists.txt +++ b/shared/source/built_ins/kernels/CMakeLists.txt -@@ -91,9 +91,9 @@ function(compile_builtin gen_type platform_type builtin bits builtin_options mod - list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}") +@@ -100,9 +100,9 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION) + ) + add_custom_command( + OUTPUT ${OUTPUT_FILE_CPP} +- COMMAND $ --file ${BINARY_OUTPUT}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} ++ COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- DEPENDS ${OUTPUT_FILES_BINARIES} $ ++ DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool + ) + endforeach() + set(BUILTINS_COMMANDS ${BUILTINS_COMMANDS} PARENT_SCOPE) +@@ -144,9 +144,9 @@ if(NOT NEO_DISABLE_BUILTINS_COMPILATION) + ) add_custom_command( OUTPUT ${OUTPUT_FILE_CPP} -- COMMAND $ --file ${OUTPUTPATH_BASE}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} -+ COMMAND cpp_generate_tool --file ${OUTPUTPATH_BASE}.gen --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --platform ${family_name_with_type} --revision_id ${REVISION_ID} +- COMMAND $ --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} ++ COMMAND cpp_generate_tool --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -- DEPENDS ${OUTPUTPATH_BASE}.gen $ -+ DEPENDS ${OUTPUTPATH_BASE}.gen cpp_generate_tool +- DEPENDS ${GENERATED_SPV_INPUT} $ ++ DEPENDS ${GENERATED_SPV_INPUT} cpp_generate_tool ) - endforeach() - set(BUILTINS_COMMANDS ${BUILTINS_COMMANDS} PARENT_SCOPE) -@@ -135,9 +135,9 @@ function(generate_cpp_spirv builtin) - ) - add_custom_command( - OUTPUT ${OUTPUT_FILE_CPP} -- COMMAND $ --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} -+ COMMAND cpp_generate_tool --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -- DEPENDS ${GENERATED_SPV_INPUT} $ -+ DEPENDS ${GENERATED_SPV_INPUT} cpp_generate_tool - ) - endfunction() + endfunction() -- -2.20.1 +2.32.0 diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.33.20678.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.37.20939.bb similarity index 89% rename from dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.33.20678.bb rename to dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.37.20939.bb index 4c94bcbe..2d1ae487 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.33.20678.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_21.37.20939.bb @@ -9,12 +9,11 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=983b0c493ea3dc3c21a90ff743bf90e4 \ file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \ - file://0001-Revert-Change-builtin-kernels-compilation-process.patch \ " SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch" -SRCREV = "4461fcdc2a0d28cab8c80b6cfc3a11baef707acc" +SRCREV = "7c1ea18f74e053907a35cc4bf91f621def9b9f38" S = "${WORKDIR}/git" @@ -33,7 +32,11 @@ EXTRA_OECMAKE = " \ -DBUILD_TYPE=Release \ -DSKIP_UNIT_TESTS=1 \ -DCCACHE_ALLOWED=FALSE \ + -DNEO_DISABLE_LD_LLD=ON \ + -DNEO_DISABLE_LD_GOLD=ON \ " +EXTRA_OECMAKE:append:class-native = " -DNEO_DISABLE_BUILTINS_COMPILATION=ON" + EXTRA_OECMAKE:append:class-target = " \ -Dcloc_cmd_prefix=ocloc \ "