aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2019-07-01 17:31:55 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-07-04 10:17:36 +0800
commit41967144c4b29e2ace0e1ec43b49944c0df3cb9f (patch)
treee9ba0c6d10bf9906d03579fc33ad5d3045ad5369
parentcba66dfb7bb96f7b711db8f9c12a325e33af5fd4 (diff)
downloadmeta-intel-41967144c4b29e2ace0e1ec43b49944c0df3cb9f.tar.gz
meta-intel-41967144c4b29e2ace0e1ec43b49944c0df3cb9f.tar.bz2
meta-intel-41967144c4b29e2ace0e1ec43b49944c0df3cb9f.zip
mkl-dnn: add ptest
Added api-c & test_c_symbols testcases under ptest. Shipping benchdnn, which is a standalone correctness and performance benchmark for Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN). Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rwxr-xr-xrecipes-core/mkl-dnn/files/run-ptest15
-rw-r--r--recipes-core/mkl-dnn/mkl-dnn_git.bb27
2 files changed, 40 insertions, 2 deletions
diff --git a/recipes-core/mkl-dnn/files/run-ptest b/recipes-core/mkl-dnn/files/run-ptest
new file mode 100755
index 00000000..82d4df58
--- /dev/null
+++ b/recipes-core/mkl-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
diff --git a/recipes-core/mkl-dnn/mkl-dnn_git.bb b/recipes-core/mkl-dnn/mkl-dnn_git.bb
index 2858d876..5846b310 100644
--- a/recipes-core/mkl-dnn/mkl-dnn_git.bb
+++ b/recipes-core/mkl-dnn/mkl-dnn_git.bb
@@ -7,11 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=afa44a3d001cc203032135324f9636b7 \
file://src/cpu/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa"
SECTION = "lib"
-inherit pkgconfig cmake
+inherit pkgconfig cmake ptest
S = "${WORKDIR}/git"
SRCREV = "027de7603662a569366e15132ac80298902b96b8"
-SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v0.19"
+SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v0.19 \
+ file://run-ptest \
+"
PV = "0.19+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
@@ -24,3 +26,24 @@ EXTRA_OECMAKE += "-DMKLDNN_THREADING=OMP"
EXTRA_OECMAKE += "-DWITH_EXAMPLE=ON"
EXTRA_OECMAKE += "-DWITH_TEST=ON"
EXTRA_OECMAKE += "-DARCH_OPT_FLAGS=''"
+EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=ON"
+
+do_install_append () {
+ install -d ${D}${bindir}/mkl-dnn
+ install -d ${D}${bindir}/mkl-dnn/tests
+ install -d ${D}${bindir}/mkl-dnn/tests/benchdnn
+ install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
+ install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn
+ cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
+}
+
+
+do_install_ptest () {
+ install -d ${D}${PTEST_PATH}/tests
+ install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests
+ install -m 0755 ${B}/tests/test_c_symbols-c ${D}${PTEST_PATH}/tests
+}
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/mkl-dnn/*"