diff options
author | Meng Mengmeng <mengmeng.meng@intel.com> | 2015-07-15 01:22:34 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-07-15 16:56:45 +0800 |
commit | 83f2ce719adfcae6433026b884e916d9c0b0ce65 (patch) | |
tree | 40e97b32f889d147d08b7238d98a2f5fbdc332fb /utests/builtin_pow.cpp | |
parent | 6e85bd3d03acc298ef5ee2c4fac6c3d4e9b66e27 (diff) | |
download | beignet-83f2ce719adfcae6433026b884e916d9c0b0ce65.tar.gz |
correct ULP value in utests
Set a global function in utests to get the right ULP value.
Diffstat (limited to 'utests/builtin_pow.cpp')
-rw-r--r-- | utests/builtin_pow.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utests/builtin_pow.cpp b/utests/builtin_pow.cpp index a8523d30..f5864483 100644 --- a/utests/builtin_pow.cpp +++ b/utests/builtin_pow.cpp @@ -28,6 +28,7 @@ static void builtin_pow(void) { // Setup kernel and buffers int k, i, index_cur; + float ULPSIZE_NO_FAST_MATH = 16.0; float gpu_data[max_function * count_input] = {0}, cpu_data[max_function * count_input] = {0}; for(i=0; i<count_input_ori;i++) @@ -40,10 +41,7 @@ static void builtin_pow(void) cl_device_fp_config fp_config; clGetDeviceInfo(device, CL_DEVICE_SINGLE_FP_CONFIG, sizeof(cl_device_fp_config), &fp_config, 0); bool denormals_supported = fp_config & CL_FP_DENORM; - const char* env_strict = getenv("OCL_STRICT_CONFORMANCE"); - float ULPSIZE_FACTOR = 16.0; - if (env_strict == NULL || strcmp(env_strict, "0") == 0) - ULPSIZE_FACTOR = 10000.; + float ULPSIZE_FACTOR = select_ulpsize(ULPSIZE_FAST_MATH,ULPSIZE_NO_FAST_MATH); OCL_CREATE_KERNEL("builtin_pow"); |