summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer
diff options
context:
space:
mode:
authorYogesh Tyagi <yogesh.tyagi@intel.com>2022-12-11 22:59:57 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2022-12-12 09:55:20 +0800
commit1153290b11f43e6f6b7bdaec1351caab70d49328 (patch)
treee6d21d3ea9bc79fe5bf75f5d4078799aa06626fc /dynamic-layers/clang-layer
parent6ca9a5cb96df3a9a46f13c66d322191f91574917 (diff)
downloadmeta-intel-1153290b11f43e6f6b7bdaec1351caab70d49328.tar.gz
ispc : Add ptest
- ispc-ptest is taking around 225 seconds to execute - Below is the run log of ispc-ptest START: ptest-runner 2022-12-07T15:43 root@qemux86-64:/usr/lib/ispc/ptest# ptest-runner ispc BEGIN: /usr/lib/ispc/ptest Testing ISPC compiler: ../../../bin/ispc Testing ISPC target: sse4-i32x4 Testing ISPC arch: x86-64 Using test compiler: Intel(r) Implicit SPMD Program Compiler (Intel(r) ISPC), 1.17.0 (build commit 7ad8429369a4d5ce @ 20220115, LLVM 12.0.0) Using C/C++ compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d28af7c654d8db0b68c175db5ce212d74fb5e9bc) Running 4 jobs in parallel. Running 1382 tests. Test varying int64: [-10000000001,-10000000002,-10000000003,-10000000004], [10000000001,10000000002,10000000003,10000000004] Test varying int64: [-10000000001,-10000000002,-10000000003,-10000000004], [10000000001,10000000002,10000000003,10000000004] Test varying int8: [-1,-2,-3,-4], [1,2,3,4]spc] Test varying int8: [-1,-2,-3,-4], [1,2,3,4] Test uniform int64: -10000000005, 10000000005 Test uniform int64: -10000000005, 10000000005 Test uniform int8: -5, 5s/paddus-vi64.ispc] Test uniform int8: -5, 5 Test bool: uniform: true, false; varying: [false,true,true,false], [true,false,false,true]; in simd cf: [_________,_________,true,false], [_________,_________,false,true]. Test bool: uniform: true, false; varying: [false,true,true,false], [true,false,false,true]; in simd cf: [_________,_________,true,false], [_________,_________,false,true]. Test uniform double: 18.250000-float-uniform.ispc] Test uniform double: 18.250000 Test varying int16: [-2,-3,-4,-5], [2,3,4,5]ispc] Test varying int16: [-2,-3,-4,-5], [2,3,4,5] Test bool: uniform: true, false; varying: [false,true,true,false], [true,false,false,true] Test bool: uniform: true, false; varying: [false,true,true,false], [true,false,false,true] Test uniform int16: -6, 6/psubus-i16.ispc] Test uniform int16: -6, 6 Test varying simd: small ones: [((1)),2,((3)),4] Test varying simd: small ones: [((1)),2,((3)),4] Test uniform int32: -7, 7/packed-store.ispc] Test uniform int32: -7, 7 Test varying int32: [-3,-4,-5,-6], [3,4,5,6] Test varying int32: [-3,-4,-5,-6], [3,4,5,6] Test varying double: [14.250000,15.250000,16.250000,17.250000] Test varying double: [14.250000,15.250000,16.250000,17.250000] Test uniform float: 9.750000catter-mask-2.ispc] Test uniform float: 9.750000 Hello World! 1382 [./tests/gs-double-improve-multidim-2.ispc] Hello World! Test varying float: [5.750000,6.750000,7.750000,8.750000] Test varying float: [5.750000,6.750000,7.750000,8.750000] Done 1382 / 1382 [./tests/test-11.ispc] Executed 1356 / 1382 (26 skipped) PASSRATE (1356/1356) = 100% PASS: ./tests/store-int8.ispc PASS: ./tests/phi-opts-4.ispc PASS: ./tests/pmulus-i32.ispc PASS: ./tests/new-delete-3.ispc PASS: ./tests/funcptr-varying-6.ispc PASS: ./tests/short-circuit-5.ispc PASS: ./tests/funcptr-uniform-6.ispc PASS: ./tests/reduce-equal-4.ispc PASS: ./tests/test-12.ispc PASS: ./tests/1475-int64.ispc PASS: ./tests/test-49.ispc PASS: ./tests/packed-load-64-4.ispc PASS: ./tests/gs-improve-multidim-1.ispc PASS: ./tests/packed-load-64-2.ispc SKIP: ./tests/max-float16-1.ispc .... .... 1356 / 1382 tests PASSED 0 / 1382 tests FAILED compilation 0 / 1382 tests FAILED execution 26 / 1382 tests SKIPPED ./tests/abs-float16.ispc ./tests/broadcast-5.ispc ./tests/clampfloat16_uniform.ispc ./tests/clampfloat16_varying.ispc ./tests/exp-uniform-float16.ispc ./tests/exp-varying-float16.ispc ./tests/isnan_float16.ispc ./tests/log-uniform-float16.ispc ./tests/log-varying-float16.ispc ./tests/max-float16-1.ispc ./tests/max-float16-2.ispc ./tests/min-float16-1.ispc ./tests/min-float16-2.ispc ./tests/pow-uniform-float16.ispc ./tests/pow-varying-float16.ispc ./tests/print_uniform-f16.ispc ./tests/print_varying-f16.ispc ./tests/rotate-7.ispc ./tests/shift-4.ispc ./tests/shuffle-6.ispc ./tests/shuffle2-12.ispc ./tests/uniform-float16-rcp.ispc ./tests/varying-float16-rcp.ispc ./tests/xe-task-count.ispc ./tests/xe-task-index-1.ispc ./tests/xe-task-index.ispc No new fails DURATION: 225 END: /usr/lib/ispc/ptest 2022-12-07T15:47 STOP: ptest-runner TOTAL: 1 FAIL: 0 - some tests are skipped based on the target architecture - change the test script to compile test programs on target with --pic option to avoid error "'.rodata' can not be used when making a PIE object" when executing tests on target - adds new print function to the test script to print test result in ptest format Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer')
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch56
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc/run-ptest2
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb15
3 files changed, 72 insertions, 1 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
new file mode 100644
index 00000000..3ce431d4
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
@@ -0,0 +1,56 @@
1From 6ba81efe971fb6038af6e950e853d35ee6dd9cc3 Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Sun, 11 Dec 2022 22:34:15 +0800
4Subject: [PATCH] Add print function to print test run status in ptest format
5
6Upstream-Status: Inappropriate [OE ptest specific]
7
8Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
9---
10 run_tests.py | 16 ++++++++++++++++
11 1 file changed, 16 insertions(+)
12
13diff --git a/run_tests.py b/run_tests.py
14index 87305a06..4f2f0f59 100755
15--- a/run_tests.py
16+++ b/run_tests.py
17@@ -385,6 +385,9 @@ def run_test(testname, host, target):
18 else:
19 ispc_exe_rel = add_prefix(host.ispc_cmd, host, target)
20
21+ # to reslove the error '.rodata' can not be used when making a PIE object
22+ ispc_exe_rel = ispc_exe_rel + " --pic"
23+
24 # is this a test to make sure an error is issued?
25 want_error = (filename.find("tests_errors") != -1)
26 if want_error == True:
27@@ -844,6 +847,17 @@ def check_compiler_exists(compiler_exe):
28 return
29 error("missing the required compiler: %s \n" % compiler_exe, 1)
30
31+def print_test_run_status(results):
32+ for fstatus in results:
33+ if (fstatus[1] == Status.Success):
34+ print( "%s: %s" % ("PASS", fstatus[0]))
35+ elif (fstatus[1] == Status.Compfail):
36+ print( "%s: %s" % ("FAIL", fstatus[0]))
37+ elif (fstatus[1] == Status.Runfail):
38+ print( "%s: %s" % ("FAIL", fstatus[0]))
39+ elif (fstatus[1] == Status.Skip):
40+ print( "%s: %s" % ("SKIP", fstatus[0]))
41+
42 def print_result(status, results, s, run_tests_log, csv):
43 title = StatusStr[status]
44 file_list = [fname for fname, fstatus in results if status == fstatus]
45@@ -987,6 +1001,8 @@ def run_tests(options1, args, print_version):
46 pass_rate = -1
47 print_debug("PASSRATE (%d/%d) = %d%% \n\n" % (len(run_succeed_files), total_tests_executed, pass_rate), s, run_tests_log)
48
49+ print_test_run_status(results)
50+
51 for status in Status:
52 print_result(status, results, s, run_tests_log, options.csv)
53 fails = [status != Status.Compfail and status != Status.Runfail for _, status in results]
54--
552.37.3
56
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/run-ptest b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/run-ptest
new file mode 100644
index 00000000..77d13bb4
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2python3 run_tests.py
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb
index 6a2e6059..b7083f82 100644
--- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.18.0.bb
@@ -7,7 +7,7 @@ LICENSE = "BSD-3-Clause & Apache-2.0-with-LLVM-exception"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \ 7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \
8 file://third-party-programs.txt;md5=3cd6f8a7c3bd9d2bb898fcb27c75221a" 8 file://third-party-programs.txt;md5=3cd6f8a7c3bd9d2bb898fcb27c75221a"
9 9
10inherit cmake python3native 10inherit cmake python3native ptest
11 11
12S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
13 13
@@ -17,13 +17,17 @@ SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
17 file://0001-Fix-QA-Issues.patch \ 17 file://0001-Fix-QA-Issues.patch \
18 file://6a1b2ffae0cc12467838bc671e3b089924de90a6.patch \ 18 file://6a1b2ffae0cc12467838bc671e3b089924de90a6.patch \
19 file://ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch \ 19 file://ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch \
20 file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \
21 file://run-ptest \
20 " 22 "
23
21SRCREV = "f7ec3aa173c816377c215d83196b5c7c3a88db1c" 24SRCREV = "f7ec3aa173c816377c215d83196b5c7c3a88db1c"
22 25
23COMPATIBLE_HOST = '(x86_64).*-linux' 26COMPATIBLE_HOST = '(x86_64).*-linux'
24 27
25DEPENDS += " clang-native bison-native flex-native" 28DEPENDS += " clang-native bison-native flex-native"
26RDEPENDS:${PN} += " clang-libllvm clang clang-libclang-cpp" 29RDEPENDS:${PN} += " clang-libllvm clang clang-libclang-cpp"
30RDEPENDS:${PN}-ptest += " python3-multiprocessing"
27 31
28YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' 32YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}'
29 33
@@ -32,6 +36,15 @@ do_configure:prepend() {
32 sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt 36 sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt
33} 37}
34 38
39do_install_ptest() {
40 cp -rf ${S}/run_tests.py ${D}${PTEST_PATH}
41 cp -rf ${S}/common.py ${D}${PTEST_PATH}
42 cp -rf ${S}/tests ${D}${PTEST_PATH}
43 cp -rf ${S}/test_static.isph ${D}${PTEST_PATH}
44 cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH}
45 cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH}
46}
47
35EXTRA_OECMAKE += " \ 48EXTRA_OECMAKE += " \
36 -DISPC_INCLUDE_TESTS=OFF \ 49 -DISPC_INCLUDE_TESTS=OFF \
37 -DISPC_INCLUDE_EXAMPLES=OFF \ 50 -DISPC_INCLUDE_EXAMPLES=OFF \