From 03f21762497caa871c949c4eff9f6c980fec3342 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Wed, 31 Jul 2019 18:29:53 +0800 Subject: intel-graphics-compiler: build only when clang layer is included igc needs components from LLVM and clang to be built. Move it to dynamic-layers/clang-layer so world builds don't fail when clang layer is not available. Signed-off-by: Anuj Mittal --- .../igc/files/0001-Fix-for-the-gcc-9-issue.patch | 76 ++++++++++++++++++++++ .../files/0001-skip-execution-of-ElfPackager.patch | 39 +++++++++++ .../igc/intel-graphics-compiler_1.0.6.bb | 27 ++++++++ .../igc/files/0001-Fix-for-the-gcc-9-issue.patch | 76 ---------------------- .../files/0001-skip-execution-of-ElfPackager.patch | 39 ----------- .../igc/intel-graphics-compiler_1.0.6.bb | 27 -------- 6 files changed, 142 insertions(+), 142 deletions(-) create mode 100644 dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch create mode 100644 dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch create mode 100644 dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb delete mode 100644 recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch delete mode 100644 recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch delete mode 100644 recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch new file mode 100644 index 00000000..70447176 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch @@ -0,0 +1,76 @@ +From c3e985e0e82e9b4c2cc8d4dbfd8ff7890daa50e0 Mon Sep 17 00:00:00 2001 +From: "Wesierski, Lukasz" +Date: Thu, 6 Jun 2019 21:00:00 -0700 +Subject: [PATCH] Fix for the gcc-9 issue. + +Fixes #91 + +Change-Id: I8149771d6add9645126cb94584f46485c256a488 + +Upstream-Status: Backport +[https://github.com/intel/intel-graphics-compiler/commit/b95b2220ddd1d50b718cae6829d832a14ff60790] + +Signed-off-by: Naveen Saini +--- + IGC/AdaptorOCL/cif/cif/common/cif.h | 8 ++++++++ + IGC/common/LLVMWarningsPop.hpp | 4 ++++ + IGC/common/LLVMWarningsPush.hpp | 10 ++++++++++ + 3 files changed, 22 insertions(+) + +diff --git a/IGC/AdaptorOCL/cif/cif/common/cif.h b/IGC/AdaptorOCL/cif/cif/common/cif.h +index 99d67d5a..00352964 100644 +--- a/IGC/AdaptorOCL/cif/cif/common/cif.h ++++ b/IGC/AdaptorOCL/cif/cif/common/cif.h +@@ -310,6 +310,14 @@ struct InterfacesList { + requestedInterfaceId, std::forward(defaultValue), std::forward(args)...); + } + ++ /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. ++ /// Arguments will be forwarded as regular function parameters to Callable::Call. ++ template ++ static RetType forwardToOne(InterfaceId_t requestedInterfaceId, DefaultValueT &&defaultValue) { ++ return forwardToOneImpl<0, RetType, Callable, DefaultValueT, InterfacePack>( ++ requestedInterfaceId, std::forward(defaultValue)); ++ } ++ + /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. + /// Arguments will be forwarded as regular function parameters to Callable::Call. + template +diff --git a/IGC/common/LLVMWarningsPop.hpp b/IGC/common/LLVMWarningsPop.hpp +index 9875acb8..f8e405d2 100644 +--- a/IGC/common/LLVMWarningsPop.hpp ++++ b/IGC/common/LLVMWarningsPop.hpp +@@ -57,3 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + #ifdef _MSC_VER + # pragma warning( pop ) + #endif ++ ++#if defined(__linux__) ++# pragma GCC diagnostic pop ++#endif +diff --git a/IGC/common/LLVMWarningsPush.hpp b/IGC/common/LLVMWarningsPush.hpp +index bab4a5e1..aca8db34 100644 +--- a/IGC/common/LLVMWarningsPush.hpp ++++ b/IGC/common/LLVMWarningsPush.hpp +@@ -55,8 +55,18 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + # pragma warning( push ) + #endif + ++#if defined(__linux__) ++# pragma GCC diagnostic push ++#endif ++ + #include + ++#if defined(__linux__) ++# if __GNUC__ > 8 ++# pragma GCC diagnostic ignored "-Winit-list-lifetime" ++# endif ++#endif ++ + #if defined( _WIN32 ) || defined( _WIN64 ) + + // 'inline' : used more than once +-- +2.17.0 + diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch new file mode 100644 index 00000000..1e0c3444 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch @@ -0,0 +1,39 @@ +From 78270818abd269bc8a1cf5deb69f15e3849333fe Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Wed, 12 Jun 2019 14:10:23 +0800 +Subject: [PATCH] skip execution of ElfPackager + +ElfPackager adds the ability to convert llvm bitcode into elf files for +easier partitioning. Skip for now until we start building a native +version for this. + +Upstream-Status: Inappropriate [configuration specific] + +Signed-off-by: Anuj Mittal +Signed-off-by: Naveen Saini +--- + IGC/ElfPackager/CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt +index 6bf4aa01..d8cd4e8b 100644 +--- a/IGC/ElfPackager/CMakeLists.txt ++++ b/IGC/ElfPackager/CMakeLists.txt +@@ -69,10 +69,10 @@ include_directories ( + ${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/ + ) + +-add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} +- POST_BUILD +- COMMAND $ -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin +- ) ++#add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} ++# POST_BUILD ++# COMMAND $ -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin ++# ) + + + add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}") +-- +2.17.0 + diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb new file mode 100644 index 00000000..f64b97fd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb @@ -0,0 +1,27 @@ +SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" +DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ +llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ +hardware architecture." + +LICENSE = "MIT & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ + file://IGC/Compiler/LegalizationPass.cpp;md5=4e9a7f0d710a0546cbf5581e1565a986" + +SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ + file://0001-skip-execution-of-ElfPackager.patch \ + file://0001-Fix-for-the-gcc-9-issue.patch \ + " + +SRCREV = "ebfc688126900a821e407a96417800919b793447" + +S = "${WORKDIR}/git" + +inherit cmake + +COMPATIBLE_HOST = '(x86_64).*-linux' +COMPATIBLE_HOST_libc-musl = "null" + +DEPENDS_class-target = " flex-native bison-native clang clang-cross-x86_64" + +EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2" +EXTRA_OECMAKE += "-DCOMMON_CLANG_LIBRARY_NAME=common_clang" diff --git a/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch b/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch deleted file mode 100644 index 70447176..00000000 --- a/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch +++ /dev/null @@ -1,76 +0,0 @@ -From c3e985e0e82e9b4c2cc8d4dbfd8ff7890daa50e0 Mon Sep 17 00:00:00 2001 -From: "Wesierski, Lukasz" -Date: Thu, 6 Jun 2019 21:00:00 -0700 -Subject: [PATCH] Fix for the gcc-9 issue. - -Fixes #91 - -Change-Id: I8149771d6add9645126cb94584f46485c256a488 - -Upstream-Status: Backport -[https://github.com/intel/intel-graphics-compiler/commit/b95b2220ddd1d50b718cae6829d832a14ff60790] - -Signed-off-by: Naveen Saini ---- - IGC/AdaptorOCL/cif/cif/common/cif.h | 8 ++++++++ - IGC/common/LLVMWarningsPop.hpp | 4 ++++ - IGC/common/LLVMWarningsPush.hpp | 10 ++++++++++ - 3 files changed, 22 insertions(+) - -diff --git a/IGC/AdaptorOCL/cif/cif/common/cif.h b/IGC/AdaptorOCL/cif/cif/common/cif.h -index 99d67d5a..00352964 100644 ---- a/IGC/AdaptorOCL/cif/cif/common/cif.h -+++ b/IGC/AdaptorOCL/cif/cif/common/cif.h -@@ -310,6 +310,14 @@ struct InterfacesList { - requestedInterfaceId, std::forward(defaultValue), std::forward(args)...); - } - -+ /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. -+ /// Arguments will be forwarded as regular function parameters to Callable::Call. -+ template -+ static RetType forwardToOne(InterfaceId_t requestedInterfaceId, DefaultValueT &&defaultValue) { -+ return forwardToOneImpl<0, RetType, Callable, DefaultValueT, InterfacePack>( -+ requestedInterfaceId, std::forward(defaultValue)); -+ } -+ - /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. - /// Arguments will be forwarded as regular function parameters to Callable::Call. - template -diff --git a/IGC/common/LLVMWarningsPop.hpp b/IGC/common/LLVMWarningsPop.hpp -index 9875acb8..f8e405d2 100644 ---- a/IGC/common/LLVMWarningsPop.hpp -+++ b/IGC/common/LLVMWarningsPop.hpp -@@ -57,3 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - #ifdef _MSC_VER - # pragma warning( pop ) - #endif -+ -+#if defined(__linux__) -+# pragma GCC diagnostic pop -+#endif -diff --git a/IGC/common/LLVMWarningsPush.hpp b/IGC/common/LLVMWarningsPush.hpp -index bab4a5e1..aca8db34 100644 ---- a/IGC/common/LLVMWarningsPush.hpp -+++ b/IGC/common/LLVMWarningsPush.hpp -@@ -55,8 +55,18 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - # pragma warning( push ) - #endif - -+#if defined(__linux__) -+# pragma GCC diagnostic push -+#endif -+ - #include - -+#if defined(__linux__) -+# if __GNUC__ > 8 -+# pragma GCC diagnostic ignored "-Winit-list-lifetime" -+# endif -+#endif -+ - #if defined( _WIN32 ) || defined( _WIN64 ) - - // 'inline' : used more than once --- -2.17.0 - diff --git a/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch b/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch deleted file mode 100644 index 1e0c3444..00000000 --- a/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 78270818abd269bc8a1cf5deb69f15e3849333fe Mon Sep 17 00:00:00 2001 -From: Naveen Saini -Date: Wed, 12 Jun 2019 14:10:23 +0800 -Subject: [PATCH] skip execution of ElfPackager - -ElfPackager adds the ability to convert llvm bitcode into elf files for -easier partitioning. Skip for now until we start building a native -version for this. - -Upstream-Status: Inappropriate [configuration specific] - -Signed-off-by: Anuj Mittal -Signed-off-by: Naveen Saini ---- - IGC/ElfPackager/CMakeLists.txt | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt -index 6bf4aa01..d8cd4e8b 100644 ---- a/IGC/ElfPackager/CMakeLists.txt -+++ b/IGC/ElfPackager/CMakeLists.txt -@@ -69,10 +69,10 @@ include_directories ( - ${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/ - ) - --add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} -- POST_BUILD -- COMMAND $ -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin -- ) -+#add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} -+# POST_BUILD -+# COMMAND $ -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin -+# ) - - - add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}") --- -2.17.0 - diff --git a/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb b/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb deleted file mode 100644 index f64b97fd..00000000 --- a/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" -DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ -llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ -hardware architecture." - -LICENSE = "MIT & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ - file://IGC/Compiler/LegalizationPass.cpp;md5=4e9a7f0d710a0546cbf5581e1565a986" - -SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ - file://0001-skip-execution-of-ElfPackager.patch \ - file://0001-Fix-for-the-gcc-9-issue.patch \ - " - -SRCREV = "ebfc688126900a821e407a96417800919b793447" - -S = "${WORKDIR}/git" - -inherit cmake - -COMPATIBLE_HOST = '(x86_64).*-linux' -COMPATIBLE_HOST_libc-musl = "null" - -DEPENDS_class-target = " flex-native bison-native clang clang-cross-x86_64" - -EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2" -EXTRA_OECMAKE += "-DCOMMON_CLANG_LIBRARY_NAME=common_clang" -- cgit v1.2.3-54-g00ecf