From 4ea4dbbb43f06bdf53862790572f702f77bc2adf Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Thu, 3 Sep 2020 11:03:53 +0800 Subject: [PATCH] intel-graphics-compiler: upgrade 1.0.4241 -> 1.0.4756 Release notes: https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.4756 Signed-off-by: Naveen Saini Signed-off-by: Anuj Mittal --- .../files/link-to-LLVMGenXIntrinsics.patch | 62 +++++++++++++++++++ ...bb => intel-graphics-compiler_1.0.4756.bb} | 7 ++- 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch rename dynamic-layers/clang-layer/recipes-opencl/igc/{intel-graphics-compiler_1.0.4241.bb => intel-graphics-compiler_1.0.4756.bb} (83%) diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch new file mode 100644 index 00000000..89a28097 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch @@ -0,0 +1,62 @@ +From 483154871f72590b81c036b000be09627376b5a9 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Thu, 27 Aug 2020 12:17:12 +0800 +Subject: [PATCH] IGC/VectorCompiler/CMakeLists.txt: link to external + LLVMGenXIntrinsics + +By default LLVMGenXIntrinsics is to be build In-tree, but we want to +link externally. + +Fix llvm-tblgen path. + +Upstream-Status: Inappropriate [configuration specific] + +Signed-off-by: Naveen Saini +--- + IGC/VectorCompiler/CMakeLists.txt | 23 ++--------------------- + 1 file changed, 2 insertions(+), 21 deletions(-) + +diff --git a/IGC/VectorCompiler/CMakeLists.txt b/IGC/VectorCompiler/CMakeLists.txt +index 3592e0b4..ae754b8b 100644 +--- a/IGC/VectorCompiler/CMakeLists.txt ++++ b/IGC/VectorCompiler/CMakeLists.txt +@@ -50,10 +50,7 @@ if(IGC_BUILD__USING_SYSTEM_LLVM OR (WIN32 AND LLVM_USE_PREBUILT)) + message(STATUS "[VC] Using system llvm") + + # Need to search for llvm-tblgen +- find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" +- ${LLVM_TOOLS_BINARY_DIR} +- NO_DEFAULT_PATH +- ) ++ find_program(LLVM_TABLEGEN_EXE "llvm-tblgen") + if(LLVM_TABLEGEN_EXE-NOTFOUND) + message(FATAL_ERROR "[VC] llvm-tblgen is not found") + endif() +@@ -131,23 +128,7 @@ if(LLVM_ON_WIN32) + add_compile_options(/wd4624) + endif() + +-if(DEFINED VC_INTRINSICS_SRC) +- set(INTRSRC "${VC_INTRINSICS_SRC}/GenXIntrinsics") +-endif() +- +-if(NOT DEFINED INTRSRC) +- set(INTRSRC "${CMAKE_CURRENT_SOURCE_DIR}/../../../vc-intrinsics/GenXIntrinsics") +-endif() +- +-message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}") +- +-# We are using prebuilt SPIRV and building intrinsics. +-set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild") +- +- +-# Do not copy anything from prebuilts. libSPIRVDLL.so will be dynamically loaded at runtime. +-add_subdirectory(${INTRSRC} ${INTRBUILD}) +-include_directories(${INTRSRC}/include ${INTRBUILD}/include) ++find_package(LLVMGenXIntrinsics REQUIRED) + + include(cmake/spirv.cmake) + include(${IGC_SOURCE_DIR}/cmake/utils.cmake) +-- +2.17.1 + diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4241.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb similarity index 83% rename from dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4241.bb rename to dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb index 762cd6b9..406f9f18 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4241.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb @@ -10,9 +10,10 @@ LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \ file://0001-skip-execution-of-ElfPackager.patch \ + file://link-to-LLVMGenXIntrinsics.patch \ " -SRCREV = "9a456d81355b266ac60b26c1865935b4a266d6e2" +SRCREV = "3623209b10b357ddb3a3d6eac3551c53ebc897f7" S = "${WORKDIR}/git" @@ -21,12 +22,12 @@ inherit cmake COMPATIBLE_HOST = '(x86_64).*-linux' COMPATIBLE_HOST_libc-musl = "null" -DEPENDS += " flex-native bison-native clang opencl-clang" +DEPENDS += " flex-native bison-native clang opencl-clang vc-intrinsics" DEPENDS_append_class-target = " clang-cross-x86_64" RDEPENDS_${PN} += "opencl-clang" -EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=10.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3" +EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=10.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 -DINSTALL_SPIRVDLL=0" BBCLASSEXTEND = "native nativesdk"