summaryrefslogtreecommitdiff
path: root/utests/utest_generator.py
AgeCommit message (Collapse)AuthorFilesLines
2015-08-05Utest: fix a builtin_powr_float fail when OCL_STRICT_CONFORMANCE=0.Yang Rong1-7/+8
Need ingore isnan and isinf when OCL_STRICT_CONFORMANCE=0. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
2015-07-15correct ULP value in utestsMeng Mengmeng1-8/+4
Set a global function in utests to get the right ULP value.
2015-04-30Allow building with Python 3Rebecca N. Palmer1-1/+2
Make the build scripts work in both Python 2 and Python 3. (CMake prefers Python 2 if both are available, but will use Python 3 if only it is installed.) Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2015-01-06Don't check some edge condtion in non-strict mode.Zhigang Gong1-2/+2
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2015-01-04add edge case detection for powr in utestsMeng Mengmeng1-2/+2
power(x,y) return Nan for x<0 in spec, so add that for powr. Signed-off-by: Meng Mengmeng <mengmeng.meng@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-12-02utests: make utests maths ULP values consistent with specificationMeng Mengmeng1-6/+94
Signed-off-by: Meng Mengmeng <mengmeng.meng@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-08-12Fix compile error for ICC compilerLv Meng1-1/+1
fix the pthread_mutex_t undefine compile error and some undefined error would occur when using math.h in C++ file.for C++ file,it is better using cmath instead off math.h. Signed-off-by: Lv Meng <meng.lv@intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
2014-06-24fix crash when OCL_STRICT_CONFORMANCE is unsetGuo Yejun1-1/+1
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-06-23utest_generator.py: add OCL_STRICT_CONFORMANCE enviroment condition.Yi Sun1-2/+12
For auto-generated math cases, when OCL_STRICT_CONFORMANCE is not set, the expected diff increases to 1000x. Signed-off-by: Yi Sun <yi.sun@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-02-21utests:add subnormal check by fpclassify.Yi Sun1-0/+3
Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Shui yangwei <yangweix.shui@intel.com>
2014-02-21Change %.20f to %e.Yi Sun1-1/+1
This can make the error information more readable. Signed-off-by: Yi Sun <yi.sun@intel.com>
2013-12-25Add test cases generator.Yi Sun1-0/+374
v1: File utest_generator.py contain the base class and function for generating File utest_math_gen.py can generate most math function for all the gentype utest_math_gen.py can be run during cmake. v2: 1. Put all the generated unit test cases to folder utest/generated. 2. Delete all generated folder while involve make clean. 3. At the top of the generated test cases, add some comments 4. Instead of defined FLT_ULP(0.000001) as the ulp unit, caculate the float ulp before using it. 5. Add several math functions' test case. v3: 1. Refine the calculation for float, and calculate each float got from cpu function. v4: Refine the calculation for float. Following fucntions test cases fail with input 0, 1 or 3.14: builtin_atan2_float builtin_atanh_float builtin_rootn_float builtin_cos_float builtin_cospi_float builtin_erf_float builtin_erfc_float builtin_mad_float builtin_nextafter_float builtin_pown_float builtin_powr_float builtin_rint_float builtin_sinpi_float builtin_tan_float builtin_tanpi_float v5: remove case builtin_mad_float todo: atan2pi fmax fmin sincos Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Yangwei Shui <yangweix.shui@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>