summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2019-07-01 09:31:55 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2019-07-04 02:17:36 (GMT)
commit41967144c4b29e2ace0e1ec43b49944c0df3cb9f (patch)
treee9ba0c6d10bf9906d03579fc33ad5d3045ad5369
parentcba66dfb7bb96f7b711db8f9c12a325e33af5fd4 (diff)
downloadmeta-intel-41967144c4b29e2ace0e1ec43b49944c0df3cb9f.tar.gz
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 0000000..82d4df5
--- /dev/null
+++ b/recipes-core/mkl-dnn/files/run-ptest
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3cd tests
4./api-c
5if [ $? -eq 0 ]; then
6 echo 'PASS: api-c'
7else
8 echo 'FAIL: api-c'
9fi
10./test_c_symbols-c
11if [ $? -eq 0 ]; then
12 echo 'PASS: test_c_symbols-c'
13else
14 echo 'FAIL: test_c_symbols-c'
15fi
diff --git a/recipes-core/mkl-dnn/mkl-dnn_git.bb b/recipes-core/mkl-dnn/mkl-dnn_git.bb
index 2858d87..5846b31 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 \
7 file://src/cpu/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa" 7 file://src/cpu/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa"
8SECTION = "lib" 8SECTION = "lib"
9 9
10inherit pkgconfig cmake 10inherit pkgconfig cmake ptest
11 11
12S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
13SRCREV = "027de7603662a569366e15132ac80298902b96b8" 13SRCREV = "027de7603662a569366e15132ac80298902b96b8"
14SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v0.19" 14SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v0.19 \
15 file://run-ptest \
16"
15PV = "0.19+git${SRCPV}" 17PV = "0.19+git${SRCPV}"
16 18
17UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$" 19UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
@@ -24,3 +26,24 @@ EXTRA_OECMAKE += "-DMKLDNN_THREADING=OMP"
24EXTRA_OECMAKE += "-DWITH_EXAMPLE=ON" 26EXTRA_OECMAKE += "-DWITH_EXAMPLE=ON"
25EXTRA_OECMAKE += "-DWITH_TEST=ON" 27EXTRA_OECMAKE += "-DWITH_TEST=ON"
26EXTRA_OECMAKE += "-DARCH_OPT_FLAGS=''" 28EXTRA_OECMAKE += "-DARCH_OPT_FLAGS=''"
29EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=ON"
30
31do_install_append () {
32 install -d ${D}${bindir}/mkl-dnn
33 install -d ${D}${bindir}/mkl-dnn/tests
34 install -d ${D}${bindir}/mkl-dnn/tests/benchdnn
35 install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
36 install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn
37 cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
38}
39
40
41do_install_ptest () {
42 install -d ${D}${PTEST_PATH}/tests
43 install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests
44 install -m 0755 ${B}/tests/test_c_symbols-c ${D}${PTEST_PATH}/tests
45}
46
47PACKAGES =+ "${PN}-test"
48
49FILES_${PN}-test = "${bindir}/mkl-dnn/*"