Replace a local patch with a backport that allows defining value for
cloc_cmd_prefix.

Signed-off-by: Anuj Mittal <[email protected]>
---
 .../dont-use-ld-library-path.patch                 | 46 ----------------------
 .../enable-external-offline-compiler.patch         | 44 +++++++++++++++++++++
 ...428.bb => intel-compute-runtime_20.12.16259.bb} | 12 +++---
 3 files changed, 51 insertions(+), 51 deletions(-)
 delete mode 100644 
dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch
 create mode 100644 
dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/enable-external-offline-compiler.patch
 rename 
dynamic-layers/clang-layer/recipes-opencl/compute-runtime/{intel-compute-runtime_20.04.15428.bb
 => intel-compute-runtime_20.12.16259.bb} (79%)

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 6f7cdff..0000000
--- 
a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From ad3e325c1af4d6533fd9b3dfc5208267b678327a Mon Sep 17 00:00:00 2001
-From: Naveen Saini <[email protected]>
-Date: Thu, 6 Feb 2020 18:25:19 +0800
-Subject: [PATCH] don't use LD_LIBRARY_PATH for native offline compiler
-
-Let us supply the correct path for it to be able to find the correct
-libraries.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Anuj Mittal <[email protected]>
-Signed-off-by: Naveen Saini <[email protected]>
----
- runtime/built_ins/kernels/CMakeLists.txt | 2 +-
- runtime/scheduler/scheduler_binary.cmake | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/runtime/built_ins/kernels/CMakeLists.txt 
b/runtime/built_ins/kernels/CMakeLists.txt
-index 863dba145..a385cf768 100644
---- a/runtime/built_ins/kernels/CMakeLists.txt
-+++ b/runtime/built_ins/kernels/CMakeLists.txt
-@@ -66,7 +66,7 @@ function(compile_builtin gen_type platform_type builtin bits 
builtin_options)
-     if(DEFINED NEO__IGC_LIBRARY_PATH)
-       set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH} 
$<TARGET_FILE:ocloc>)
-     else()
--      set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> 
$<TARGET_FILE:ocloc>)
-+      set(cloc_cmd_prefix ocloc)
-     endif()
-   endif()
-   list(APPEND __cloc__options__ "-cl-kernel-arg-info")
-diff --git a/runtime/scheduler/scheduler_binary.cmake 
b/runtime/scheduler/scheduler_binary.cmake
-index a7015b909..a720d2f5c 100644
---- a/runtime/scheduler/scheduler_binary.cmake
-+++ b/runtime/scheduler/scheduler_binary.cmake
-@@ -37,7 +37,7 @@ function(compile_kernel target gen_type platform_type kernel)
-     if(DEFINED NEO__IGC_LIBRARY_PATH)
-       set(cloc_cmd_prefix LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH} 
$<TARGET_FILE:ocloc>)
-     else()
--      set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> 
$<TARGET_FILE:ocloc>)
-+      set(cloc_cmd_prefix ocloc)
-     endif()
-   endif()
-   list(APPEND __cloc__options__ "-cl-kernel-arg-info")
--- 
-2.17.1
-
diff --git 
a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/enable-external-offline-compiler.patch
 
b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/enable-external-offline-compiler.patch
new file mode 100644
index 0000000..d3e7d14
--- /dev/null
+++ 
b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/enable-external-offline-compiler.patch
@@ -0,0 +1,44 @@
+From 6f6d64569d75f6fc352ce7ce3a65dd88f0f84b99 Mon Sep 17 00:00:00 2001
+From: Dongwon Kim <[email protected]>
+Date: Wed, 25 Mar 2020 15:02:43 -0700
+Subject: [PATCH] Optionally enable external ocl offline compiler
+
+Expand commit af78548e80cb293ccc6b02b45ac03d249de03bc6 to
+scheduler's build configuration
+
+Change-Id: I04a5fc5f85d15bac040ad699df4c39cc2e0182aa
+Signed-off-by: Dongwon Kim <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <[email protected]>
+---
+ opencl/source/scheduler/scheduler_binary.cmake | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/opencl/source/scheduler/scheduler_binary.cmake 
b/opencl/source/scheduler/scheduler_binary.cmake
+index 740ff7d63..c57e28f78 100644
+--- a/opencl/source/scheduler/scheduler_binary.cmake
++++ b/opencl/source/scheduler/scheduler_binary.cmake
+@@ -31,13 +31,16 @@ function(compile_kernel target gen_type platform_type 
kernel)
+   set(OUTPUTPATH "${OUTPUTDIR}/${BASENAME}_${family_name_with_type}.bin")
+ 
+   set(SCHEDULER_CPP "${OUTPUTDIR}/${BASENAME}_${family_name_with_type}.cpp")
+-  if(WIN32)
+-    set(cloc_cmd_prefix ocloc)
+-  else()
+-    if(DEFINED NEO__IGC_LIBRARY_PATH)
+-      set(cloc_cmd_prefix 
LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> 
$<TARGET_FILE:ocloc>)
++
++  if(NOT DEFINED cloc_cmd_prefix)
++    if(WIN32)
++      set(cloc_cmd_prefix ocloc)
+     else()
+-      set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> 
$<TARGET_FILE:ocloc>)
++      if(DEFINED NEO__IGC_LIBRARY_PATH)
++        set(cloc_cmd_prefix 
LD_LIBRARY_PATH=${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> 
$<TARGET_FILE:ocloc>)
++      else()
++        set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc_lib> 
$<TARGET_FILE:ocloc>)
++      endif()
+     endif()
+   endif()
+   list(APPEND __cloc__options__ "-cl-kernel-arg-info")
diff --git 
a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.04.15428.bb
 
b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.12.16259.bb
similarity index 79%
rename from 
dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.04.15428.bb
rename to 
dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.12.16259.bb
index f6cfaf1..2ea9a68 100644
--- 
a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.04.15428.bb
+++ 
b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_20.12.16259.bb
@@ -9,12 +9,10 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=ae27f47fd6755510247c19e547e4c804 \
                     
file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b"
 
 SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \
+           file://enable-external-offline-compiler.patch \
            "
 
-SRC_URI_append_class-target = " \
-      file://dont-use-ld-library-path.patch \
-"
-SRCREV = "98006aa2bf282ebc5914359e0e4c5f1c539de56f"
+SRCREV = "43016c65591bd125a9590ea05ca83d094a628f79"
 
 S = "${WORKDIR}/git"
 
@@ -33,9 +31,13 @@ EXTRA_OECMAKE = " \
                  -DBUILD_TYPE=Release \
                  -DSKIP_UNIT_TESTS=1 \
                  -DCCACHE_ALLOWED=FALSE \
+                 -Dcloc_cmd_prefix=ocloc \
                  "
 
-FILES_${PN} += "${libdir}/intel-opencl/libigdrcl.so"
+FILES_${PN} += " \
+                 ${libdir}/intel-opencl/libigdrcl.so \
+                 ${libdir}/intel-opencl/libocloc.so \
+                 "
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#6464): 
https://lists.yoctoproject.org/g/meta-intel/message/6464
Mute This Topic: https://lists.yoctoproject.org/mt/72767454/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to