summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/compute-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/compute-runtime')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch41
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch38
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch43
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb45
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb63
5 files changed, 142 insertions, 88 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch
new file mode 100644
index 00000000..45288ce1
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0002-Build-not-able-to-locate-cpp_generation_tool.patch
@@ -0,0 +1,41 @@
1From 8c330d0cb5167612296801f0202b0de35e9ca88d Mon Sep 17 00:00:00 2001
2From: Dongwon Kim <dongwon.kim@intel.com>
3Date: Sat, 21 Aug 2021 16:09:39 -0700
4Subject: [PATCH 2/5] Build not able to locate cpp_generation_tool.
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
9Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
10---
11 shared/source/built_ins/kernels/CMakeLists.txt | 10 +++++-----
12 1 file changed, 5 insertions(+), 5 deletions(-)
13
14Index: git/shared/source/built_ins/kernels/CMakeLists.txt
15===================================================================
16--- git.orig/shared/source/built_ins/kernels/CMakeLists.txt
17+++ git/shared/source/built_ins/kernels/CMakeLists.txt
18@@ -122,9 +122,9 @@ function(compile_builtin core_type platf
19 endif()
20 add_custom_command(
21 OUTPUT ${OUTPUT_FILE_CPP}
22- COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME}
23+ COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME}
24 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
25- DEPENDS ${OUTPUT_FILES_BINARIES} $<TARGET_FILE:cpp_generate_tool>
26+ DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool
27 )
28 list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}")
29 else()
30@@ -176,9 +176,9 @@ function(generate_cpp_spirv builtin)
31 endif()
32 add_custom_command(
33 OUTPUT ${OUTPUT_FILE_CPP}
34- COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME}
35+ COMMAND cpp_generate_tool --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME}
36 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
37- DEPENDS ${GENERATED_SPV_INPUT} $<TARGET_FILE:cpp_generate_tool>
38+ DEPENDS ${GENERATED_SPV_INPUT} cpp_generate_tool
39 )
40 set(OUTPUT_LIST_CPP_FILES ${OUTPUT_LIST_CPP_FILES} ${OUTPUT_FILE_CPP} PARENT_SCOPE)
41 else()
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch
new file mode 100644
index 00000000..2001d839
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0003-external-ocloc.patch
@@ -0,0 +1,38 @@
1From 0006db5f55a9f08bd3452558a53704cd3bbb790f Mon Sep 17 00:00:00 2001
2From: Dongwon Kim <dongwon.kim@intel.com>
3Date: Wed, 2 Mar 2022 15:52:45 -0800
4Subject: [PATCH 3/5] external ocloc
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
9---
10 cmake/ocloc_cmd_prefix.cmake | 14 ++++++++------
11 1 file changed, 8 insertions(+), 6 deletions(-)
12
13Index: git/cmake/ocloc_cmd_prefix.cmake
14===================================================================
15--- git.orig/cmake/ocloc_cmd_prefix.cmake
16+++ git/cmake/ocloc_cmd_prefix.cmake
17@@ -4,13 +4,15 @@
18 # SPDX-License-Identifier: MIT
19 #
20
21-if(WIN32)
22- set(ocloc_cmd_prefix ocloc)
23-else()
24- if(DEFINED NEO__IGC_LIBRARY_PATH)
25- set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>)
26+if(NOT DEFINED ocloc_cmd_prefix)
27+ if(WIN32)
28+ set(ocloc_cmd_prefix ocloc)
29 else()
30- set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>)
31+ if(DEFINED NEO__IGC_LIBRARY_PATH)
32+ set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
33+ else()
34+ set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
35+ endif()
36 endif()
37 endif()
38
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch
deleted file mode 100644
index b886b95d..00000000
--- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 2475dfc1350f73a243c9fc223a9f06af85321d56 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 2 Jul 2019 08:36:34 +0800
4Subject: [PATCH] don't use LD_LIBRARY_PATH for native offline compiler
5
6Let us supply the correct path for it to be able to find the correct
7libraries.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12
13---
14 runtime/built_ins/kernels/CMakeLists.txt | 2 +-
15 runtime/scheduler/scheduler_binary.cmake | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/runtime/built_ins/kernels/CMakeLists.txt b/runtime/built_ins/kernels/CMakeLists.txt
19index 5dc9fe1b..e258847d 100644
20--- a/runtime/built_ins/kernels/CMakeLists.txt
21+++ b/runtime/built_ins/kernels/CMakeLists.txt
22@@ -51,7 +51,7 @@ function(compile_builtin gen_type platform_type builtin)
23 if(DEFINED IGDRCL__IGC_LIBRARY_PATH)
24 set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>)
25 else()
26- set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>)
27+ set(cloc_cmd_prefix ocloc)
28 endif()
29 endif()
30 list(APPEND __cloc__options__ "-cl-kernel-arg-info")
31diff --git a/runtime/scheduler/scheduler_binary.cmake b/runtime/scheduler/scheduler_binary.cmake
32index 1b12592b..ed9f375d 100644
33--- a/runtime/scheduler/scheduler_binary.cmake
34+++ b/runtime/scheduler/scheduler_binary.cmake
35@@ -37,7 +37,7 @@ function(compile_kernel target gen_type platform_type kernel)
36 if(DEFINED IGDRCL__IGC_LIBRARY_PATH)
37 set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>)
38 else()
39- set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>)
40+ set(cloc_cmd_prefix ocloc)
41 endif()
42 endif()
43 list(APPEND __cloc__options__ "-cl-kernel-arg-info")
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb
deleted file mode 100644
index 8c023480..00000000
--- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.35.13977.bb
+++ /dev/null
@@ -1,45 +0,0 @@
1SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)"
2DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \
3is an open source project to converge Intel's development efforts \
4on OpenCL(TM) compute stacks supporting the GEN graphics hardware \
5architecture."
6
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=ae27f47fd6755510247c19e547e4c804 \
9 file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b"
10
11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \
12 "
13
14SRC_URI_append_class-target = " \
15 file://dont-use-ld-library-path.patch \
16"
17
18SRCREV = "cb4e5576cb5414ab3af54c49819a4ced305b965b"
19
20S = "${WORKDIR}/git"
21
22DEPENDS += " intel-graphics-compiler gmmlib clang"
23DEPENDS_append_class-target = " intel-compute-runtime-native"
24
25RDEPENDS_${PN} += " intel-graphics-compiler gmmlib"
26
27inherit cmake pkgconfig
28
29COMPATIBLE_HOST = '(x86_64).*-linux'
30COMPATIBLE_HOST_libc-musl = "null"
31
32EXTRA_OECMAKE = " \
33 -DBUILD_TYPE=Release \
34 -DSKIP_UNIT_TESTS=1 \
35 -DCCACHE_ALLOWED=FALSE \
36 "
37
38LDFLAGS_append_class-native = " -fuse-ld=lld"
39TOOLCHAIN_class-native = "clang"
40
41FILES_${PN} += "${libdir}/intel-opencl/libigdrcl.so"
42
43BBCLASSEXTEND = "native nativesdk"
44
45EXCLUDE_FROM_WORLD = "1"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb
new file mode 100644
index 00000000..635e8c2f
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_25.13.33276.16.bb
@@ -0,0 +1,63 @@
1SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)"
2DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \
3is an open source project to converge Intel's development efforts \
4on OpenCL(TM) compute stacks supporting the GEN graphics hardware \
5architecture."
6
7LICENSE = "MIT & Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \
9 file://third_party/opencl_headers/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
10
11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/25.13 \
12 file://0002-Build-not-able-to-locate-cpp_generation_tool.patch \
13 file://0003-external-ocloc.patch \
14 "
15
16SRCREV = "a9961bdfaa07250fd52ff930bf8f31fb4e3b7799"
17
18S = "${WORKDIR}/git"
19
20DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native"
21
22RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
23
24inherit cmake pkgconfig qemu
25
26COMPATIBLE_HOST = '(x86_64).*-linux'
27COMPATIBLE_HOST:libc-musl = "null"
28
29EXTRA_OECMAKE = " \
30 -DIGC_DIR=${STAGING_INCDIR}/igc \
31 -DBUILD_TYPE=Release \
32 -DSKIP_UNIT_TESTS=1 \
33 -DCCACHE_ALLOWED=FALSE \
34 -DNEO_DISABLE_LD_LLD=ON \
35 -DNEO_DISABLE_LD_GOLD=ON \
36 "
37
38EXTRA_OECMAKE:append:class-target = " \
39 -Docloc_cmd_prefix=ocloc \
40 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
41 "
42
43PACKAGECONFIG ??= ""
44PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero"
45
46do_configure:prepend:class-target () {
47 # Write out a qemu wrapper that will be used by cmake.
48 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${B}/bin'),d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
49 cat > ${WORKDIR}/qemuwrapper << EOF
50#!/bin/sh
51$qemu_binary "\$@"
52EOF
53 chmod +x ${WORKDIR}/qemuwrapper
54}
55
56FILES:${PN} += " \
57 ${libdir}/intel-opencl/libigdrcl.so \
58 ${libdir}/libocloc.so \
59 "
60
61FILES:${PN}-dev = "${includedir}"
62
63UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"