summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2021-10-12 15:51:14 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2021-10-13 03:23:34 (GMT)
commit467d15d57afea208fb7bc35e486ee274700dca70 (patch)
treee2067c0bb3c38f4e6f7a962299ef3d535bc95247
parent9c565a8da495d5bf2799ae28be9e2a528fa72602 (diff)
downloadmeta-intel-467d15d57afea208fb7bc35e486ee274700dca70.tar.gz
intel-graphics-compiler: enable VectorCompiler
Use the option to use Khronos translator instead of the pre-built SPIRVDLL with VC. Also have the native recipe install a binary needed for the target builds. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch35
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8744.bb7
2 files changed, 41 insertions, 1 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch
new file mode 100644
index 0000000..a6af0ef
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch
@@ -0,0 +1,35 @@
1From 6f6997066040c5f33bf05ffde36a9800dcde1fcf Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 12 Oct 2021 23:46:42 +0800
4Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS
5
6Otherwise it starts failing with:
7
8| ninja: error: 'IGC/VectorCompiler/lib/BiF/opt', needed by 'IGC/VectorCompiler/lib/BiF/VCBiFPrintfOCL32.opt.bc', missing and no known rule to make it
9
10We don't need to explicitly make sure opt is built when
11using prebuilt binaries.
12
13Upstream-Status: Inappropriate
14
15Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
16---
17 IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt
21index 5d9a901d7..66e59e399 100644
22--- a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt
23+++ b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt
24@@ -88,7 +88,7 @@ function(vc_embed_bif RES_FILE CMCL_SRC_PATH BIF_NAME PTR_BIT_SIZE)
25 add_custom_command(OUTPUT ${BIF_OPT_BC_PATH}
26 COMMAND ${LLVM_OPT_EXE} --O2 -o ${BIF_OPT_BC_NAME} ${BIF_CMCL_BC_NAME}
27 COMMENT "vc_embed_bif: running opt with O2: ${BIF_CMCL_BC_NAME} -> ${BIF_OPT_BC_NAME}"
28- DEPENDS opt ${BIF_CMCL_BC_PATH})
29+ DEPENDS ${BIF_CMCL_BC_PATH})
30 add_custom_command(
31 OUTPUT ${BIF_CPP_PATH}
32 COMMAND ${PYTHON_EXECUTABLE} ${RESOURCE_EMBEDDER_SCRIPT} ${BIF_OPT_BC_NAME} ${BIF_CPP_NAME}
33--
342.32.0
35
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8744.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8744.bb
index 1469bc1..9ed828b 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8744.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8744.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;nam
13 file://0001-llvm_deps.cmake-don-t-copy-header-file-when-building.patch \ 13 file://0001-llvm_deps.cmake-don-t-copy-header-file-when-building.patch \
14 file://0003-Improve-Reproducibility-for-src-package.patch \ 14 file://0003-Improve-Reproducibility-for-src-package.patch \
15 file://0004-find-external-llvm-tblgen.patch \ 15 file://0004-find-external-llvm-tblgen.patch \
16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \
16 " 17 "
17 18
18SRCREV_igc = "3ba8dde8c414a0e47df58b1bba12a64f8ba2089e" 19SRCREV_igc = "3ba8dde8c414a0e47df58b1bba12a64f8ba2089e"
@@ -40,12 +41,16 @@ EXTRA_OECMAKE = " \
40 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ 41 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
41 -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ 42 -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \
42 -DIGC_OPTION__LLVM_MODE=Prebuilds \ 43 -DIGC_OPTION__LLVM_MODE=Prebuilds \
43 -DIGC_BUILD__VC_ENABLED=OFF \ 44 -DIGC_BUILD__VC_ENABLED=ON \
45 -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \
46 -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_VC=ON \
47 -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \
44 " 48 "
45 49
46do_install:append:class-native () { 50do_install:append:class-native () {
47 install -d ${D}${bindir} 51 install -d ${D}${bindir}
48 install ${B}/IGC/Release/elf_packager ${D}${bindir}/ 52 install ${B}/IGC/Release/elf_packager ${D}${bindir}/
53 install ${B}/IGC/Release/CMCLTranslatorTool ${D}${bindir}/
49} 54}
50 55
51BBCLASSEXTEND = "native nativesdk" 56BBCLASSEXTEND = "native nativesdk"