diff options
author | Pan Xiuli <xiuli.pan@intel.com> | 2016-05-17 07:03:46 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-06-13 17:02:23 +0800 |
commit | d4915e9fd71110143762c12487c45f4282d9320c (patch) | |
tree | c892aae275cb8306cbe30776c23815bc06b5f4db /utests | |
parent | 1447843d67ffdc5348ab7255c240836afa61ba81 (diff) | |
download | beignet-d4915e9fd71110143762c12487c45f4282d9320c.tar.gz |
Utest: Remove old sub_group_all/any utest
This utest does not follow spec, so just remove them.
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests')
-rw-r--r-- | utests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | utests/compiler_sub_group_all.cpp | 43 | ||||
-rw-r--r-- | utests/compiler_sub_group_any.cpp | 43 |
3 files changed, 0 insertions, 88 deletions
diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt index 76b50a5e..7ea10e05 100644 --- a/utests/CMakeLists.txt +++ b/utests/CMakeLists.txt @@ -241,8 +241,6 @@ set (utests_sources compiler_private_const.cpp compiler_private_data_overflow.cpp compiler_getelementptr_bitcast.cpp - compiler_sub_group_any.cpp - compiler_sub_group_all.cpp compiler_time_stamp.cpp compiler_double_precision.cpp compiler_double.cpp diff --git a/utests/compiler_sub_group_all.cpp b/utests/compiler_sub_group_all.cpp deleted file mode 100644 index d8e41300..00000000 --- a/utests/compiler_sub_group_all.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "utest_helper.hpp" - -void compiler_sub_group_all(void) -{ - const size_t n = 40; - - // Setup kernel and buffers - OCL_CREATE_KERNEL("compiler_sub_group_all"); - OCL_CREATE_BUFFER(buf[0], 0, n * sizeof(int), NULL); - OCL_CREATE_BUFFER(buf[1], 0, n * sizeof(int), NULL); - OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]); - OCL_SET_ARG(1, sizeof(cl_mem), &buf[1]); - - globals[0] = n; - locals[0] = 10; - - OCL_MAP_BUFFER(0); - for (int32_t i = 0; i < (int32_t) n; ++i) - ((int*)buf_data[0])[i] = i; - OCL_UNMAP_BUFFER(0); - - // Run the kernel on GPU - OCL_NDRANGE(1); - - // Run on CPU - - // Compare - OCL_MAP_BUFFER(1); - for (int32_t i = 0; i < (int32_t) n; ++i) { - //printf("%d %d\n", i, ((int *)buf_data[1])[i]); - if (i % 2 == 1) { - if (i < (int32_t)locals[0]) - OCL_ASSERT(((int *)buf_data[1])[i] == 1); - else - OCL_ASSERT(((int *)buf_data[1])[i] == 2); - } - else - OCL_ASSERT(((int *)buf_data[1])[i] == 3); - } - OCL_UNMAP_BUFFER(1); -} - -MAKE_UTEST_FROM_FUNCTION(compiler_sub_group_all); diff --git a/utests/compiler_sub_group_any.cpp b/utests/compiler_sub_group_any.cpp deleted file mode 100644 index 98b1bdd4..00000000 --- a/utests/compiler_sub_group_any.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "utest_helper.hpp" - -void compiler_sub_group_any(void) -{ - const size_t n = 40; - - // Setup kernel and buffers - OCL_CREATE_KERNEL("compiler_sub_group_any"); - OCL_CREATE_BUFFER(buf[0], 0, n * sizeof(int), NULL); - OCL_CREATE_BUFFER(buf[1], 0, n * sizeof(int), NULL); - OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]); - OCL_SET_ARG(1, sizeof(cl_mem), &buf[1]); - - globals[0] = n; - locals[0] = 10; - - OCL_MAP_BUFFER(0); - for (int32_t i = 0; i < (int32_t) n; ++i) - ((int*)buf_data[0])[i] = i; - OCL_UNMAP_BUFFER(0); - - // Run the kernel on GPU - OCL_NDRANGE(1); - - // Run on CPU - - // Compare - OCL_MAP_BUFFER(1); - for (int32_t i = 0; i < (int32_t) n; ++i){ - //printf("%d %d\n", i, ((int *)buf_data[1])[i]); - if (i % 2 == 1) { - if (i < (int32_t)locals[0]) - OCL_ASSERT(((int *)buf_data[1])[i] == 1); - else - OCL_ASSERT(((int *)buf_data[1])[i] == 2); - } - else - OCL_ASSERT(((int *)buf_data[1])[i] == 3); - } - OCL_UNMAP_BUFFER(1); -} - -MAKE_UTEST_FROM_FUNCTION(compiler_sub_group_any); |