aboutsummaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-core/dnn/files
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-core/dnn/files')
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch34
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch33
-rwxr-xr-xdynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest15
3 files changed, 82 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch b/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch
new file mode 100644
index 00000000..aee0934a
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch
@@ -0,0 +1,34 @@
+From 89ebbee73ff0af48eaaec63335b749a176a317bb Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 21 Apr 2020 09:18:09 +0800
+Subject: [PATCH 1/2] src/CMakeLists.txt: fix FindOpenCL.cmake source path
+
+The existing logic doesn't work when DESTDIR is being passed to cmake.
+The file is installed in DESTDIR/CMAKE_INSTALL_PREFIX/libdir while we're
+trying to copy it from CMAKE_INSTALL_PREFIX/libdir.
+
+Use the file from source tree instead.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 88e318923..0c99fefae 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -203,7 +203,7 @@ if(DNNL_GPU_RUNTIME STREQUAL "OCL")
+ install(FILES
+ "../cmake/FindOpenCL.cmake"
+ DESTINATION ${LIB_CONFIG_INSTALL_DIR})
+- install(FILES "${CMAKE_INSTALL_PREFIX}/${LIB_CONFIG_INSTALL_DIR}/FindOpenCL.cmake"
++ install(FILES "../cmake/FindOpenCL.cmake"
+ DESTINATION ${LIB_CONFIG_INSTALL_DIR_COMPAT})
+ endif()
+
+--
+2.25.3
+
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch b/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch
new file mode 100644
index 00000000..02c0f81e
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch
@@ -0,0 +1,33 @@
+From 3693305c9497f940b011e3e8b9d707d4f8075234 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 21 Apr 2020 09:19:38 +0800
+Subject: [PATCH 2/2] src/CMakeLists.txt: use value of DESTDIR
+
+Make sure that we're using the value of DESTDIR for the paths that are
+being created to look into paths of installed files. Ensure that
+cmake_install.cmake actually has $ENV{DESTDIR} which gets expanded if
+it's being passed to cmake.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0c99fefae..2f1499d0d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -137,7 +137,7 @@ install(EXPORT ${LIB_EXPORT_NAME}
+
+ # Intel MKL-DNN compat cmake files
+ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND}
+- -DDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake
++ -DDIR=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake
+ -P ${PROJECT_SOURCE_DIR}/cmake/gen_mkldnn_compat_cmakes.cmake)")
+
+ # Intel MKL-DNN compat libraries
+--
+2.25.3
+
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest
new file mode 100755
index 00000000..82d4df58
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+cd tests
+./api-c
+if [ $? -eq 0 ]; then
+ echo 'PASS: api-c'
+else
+ echo 'FAIL: api-c'
+fi
+./test_c_symbols-c
+if [ $? -eq 0 ]; then
+ echo 'PASS: test_c_symbols-c'
+else
+ echo 'FAIL: test_c_symbols-c'
+fi