summaryrefslogtreecommitdiff
path: root/utests/compiler_basic_arithmetic.cpp
diff options
context:
space:
mode:
authorYi Sun <yi.sun@intel.com>2014-04-01 16:31:26 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-04-02 13:08:35 +0800
commit684608ba6459c8a987ead861a7efa22979e79c4c (patch)
treeacfc61d5fe533b3cccfa7051f759c51dd89db1fd /utests/compiler_basic_arithmetic.cpp
parent093c12c5d90bc3df4aa4ce55912c005a10f070da (diff)
downloadbeignet-684608ba6459c8a987ead861a7efa22979e79c4c.tar.gz
Statistics of case running
summary: ----------------- 1. Add struct RStatistics to count passed number(passCount), failed number(failCount), finished run number(finishrun). 2. Print statistics line , if the termial is too narrow, doesn't print it: ...... test_load_program_from_bin() [SUCCESS] profiling_exec() [SUCCESS] enqueue_copy_buf() [SUCCESS] [run/total: 656/656] pass: 629; fail: 25; pass rate: 0.961890 3. If case crashes, count it as failed, add the function to show statistic summary. 4. When all cases finished, list a summary like follows: summary: ---------- total: 656 run: 656 pass: 629 fail: 25 pass rate: 0.961890 5. If ./utest_run &> log, the log will be a little messy, tring the following command to analyse the log: sed 's/\r/\n/g' log | egrep "\w*\(\)" | sed -e 's/\s//g' After analysed: ----------------- ...... builtin_minmag_float2()[SUCCESS] builtin_minmag_float4()[SUCCESS] builtin_minmag_float8()[SUCCESS] builtin_minmag_float16()[SUCCESS] builtin_nextafter_float()[FAILED] builtin_nextafter_float2()[FAILED] builtin_nextafter_float4()[FAILED] ...... 6. Fix one issue, print out the crashed case name. 7. Delete the debug line in utests/compiler_basic_arithmetic.cpp, which output the kernel name. 8. Define function statistics() in struct UTest, which called by "utest_run -a/-c/-n". We just call this function to run each case, and print the statistics line. Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/compiler_basic_arithmetic.cpp')
-rw-r--r--utests/compiler_basic_arithmetic.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/utests/compiler_basic_arithmetic.cpp b/utests/compiler_basic_arithmetic.cpp
index 0e5ec41a..ba05de03 100644
--- a/utests/compiler_basic_arithmetic.cpp
+++ b/utests/compiler_basic_arithmetic.cpp
@@ -15,7 +15,6 @@ static void test_exec(const char* kernel_name)
// Setup kernel and buffers
OCL_CREATE_KERNEL_FROM_FILE("compiler_basic_arithmetic", kernel_name);
-std::cout <<"kernel name: " << kernel_name << std::endl;
buf_data[0] = (T*) malloc(sizeof(T) * n);
buf_data[1] = (T*) malloc(sizeof(T) * n);
for (uint32_t i = 0; i < n; ++i) ((T*)buf_data[0])[i] = (T) rand();