diff options
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl')
2 files changed, 86 insertions, 0 deletions
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 new file mode 100644 index 00000000..b886b95d --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 2475dfc1350f73a243c9fc223a9f06af85321d56 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 2 Jul 2019 08:36:34 +0800 | ||
4 | Subject: [PATCH] don't use LD_LIBRARY_PATH for native offline compiler | ||
5 | |||
6 | Let us supply the correct path for it to be able to find the correct | ||
7 | libraries. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-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 | |||
18 | diff --git a/runtime/built_ins/kernels/CMakeLists.txt b/runtime/built_ins/kernels/CMakeLists.txt | ||
19 | index 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") | ||
31 | diff --git a/runtime/scheduler/scheduler_binary.cmake b/runtime/scheduler/scheduler_binary.cmake | ||
32 | index 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.21.13045.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.21.13045.bb new file mode 100644 index 00000000..72992567 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.21.13045.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \ | ||
3 | is an open source project to converge Intel's development efforts \ | ||
4 | on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ | ||
5 | architecture." | ||
6 | |||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ae27f47fd6755510247c19e547e4c804 \ | ||
9 | file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \ | ||
12 | " | ||
13 | |||
14 | SRC_URI_append_class-target = " \ | ||
15 | file://dont-use-ld-library-path.patch \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "7989a68f6ff72372d8eb5ea3c8bd52fad6778b8f" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | DEPENDS += " intel-graphics-compiler gmmlib clang" | ||
23 | DEPENDS_append_class-target = " intel-compute-runtime-native" | ||
24 | |||
25 | inherit cmake pkgconfig | ||
26 | |||
27 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
28 | COMPATIBLE_HOST_libc-musl = "null" | ||
29 | |||
30 | EXTRA_OECMAKE = " \ | ||
31 | -DBUILD_TYPE=Release \ | ||
32 | -DSKIP_UNIT_TESTS=1 \ | ||
33 | -DCCACHE_ALLOWED=FALSE \ | ||
34 | " | ||
35 | |||
36 | LDFLAGS_append_class-native = " -fuse-ld=lld" | ||
37 | TOOLCHAIN_class-native = "clang" | ||
38 | |||
39 | FILES_${PN} += "${libdir}/intel-opencl/libigdrcl.so" | ||
40 | |||
41 | BBCLASSEXTEND = "native nativesdk" | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||