From 6fc38707280747ed66555115b48af774a8f326e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Petit?= Date: Tue, 7 Jan 2025 18:00:12 +0000 Subject: [PATCH] Delete read_array_half and write_array_half tests (#2212) These tests are broken, have been disabled for the longest time, and don't add significant value. Signed-off-by: Kevin Petit --- test_conformance/profiling/readArray.cpp | 63 ---------------- test_conformance/profiling/writeArray.cpp | 89 ----------------------- 2 files changed, 152 deletions(-) diff --git a/test_conformance/profiling/readArray.cpp b/test_conformance/profiling/readArray.cpp index 021c3ff43b..a5946d0cbc 100644 --- a/test_conformance/profiling/readArray.cpp +++ b/test_conformance/profiling/readArray.cpp @@ -322,45 +322,6 @@ const char *stream_read_float_kernel_code[] = { const char *float_kernel_name[] = { "test_stream_read_float", "test_stream_read_float2", "test_stream_read_float4", "test_stream_read_float8", "test_stream_read_float16" }; -const char *stream_read_half_kernel_code[] = { -"__kernel void test_stream_read_half(__global half *dst)\n" -"{\n" -" int tid = get_global_id(0);\n" -"\n" -" dst[tid] = (half)119;\n" -"}\n", - -"__kernel void test_stream_read_half2(__global half2 *dst)\n" -"{\n" -" int tid = get_global_id(0);\n" -"\n" -" dst[tid] = (half)119;\n" -"}\n", - -"__kernel void test_stream_read_half4(__global half4 *dst)\n" -"{\n" -" int tid = get_global_id(0);\n" -"\n" -" dst[tid] = (half)119;\n" -"}\n", - -"__kernel void test_stream_read_half8(__global half8 *dst)\n" -"{\n" -" int tid = get_global_id(0);\n" -"\n" -" dst[tid] = (half)119;\n" -"}\n", - -"__kernel void test_stream_read_half16(__global half16 *dst)\n" -"{\n" -" int tid = get_global_id(0);\n" -"\n" -" dst[tid] = (half)119;\n" -"}\n" }; - -const char *half_kernel_name[] = { "test_stream_read_half", "test_stream_read_half2", "test_stream_read_half4", "test_stream_read_half8", "test_stream_read_half16" }; - - const char *stream_read_char_kernel_code[] = { "__kernel void test_stream_read_char(__global char *dst)\n" "{\n" @@ -555,20 +516,6 @@ static int verify_read_float( void *ptr, int n ) } -static int verify_read_half( void *ptr, int n ) -{ - int i; - float *outptr = (float *)ptr; - - for( i = 0; i < n / 2; i++ ){ - if( outptr[i] != TEST_PRIME_HALF ) - return -1; - } - - return 0; -} - - static int verify_read_char(void *ptr, int n) { int i; @@ -840,16 +787,6 @@ REGISTER_TEST(read_array_float) } -REGISTER_TEST(read_array_half) -{ - int (*foo)(void *,int); - foo = verify_read_half; - - return test_stream_read( device, context, queue, num_elements, sizeof( cl_half ), "half", 5, - stream_read_half_kernel_code, half_kernel_name, foo ); -} - - REGISTER_TEST(read_array_char) { int (*foo)(void *,int); diff --git a/test_conformance/profiling/writeArray.cpp b/test_conformance/profiling/writeArray.cpp index f6028273dc..80fd455761 100644 --- a/test_conformance/profiling/writeArray.cpp +++ b/test_conformance/profiling/writeArray.cpp @@ -310,45 +310,6 @@ const char *stream_write_float_kernel_code[] = { static const char *float_kernel_name[] = { "test_stream_write_float", "test_stream_write_float2", "test_stream_write_float4", "test_stream_write_float8", "test_stream_write_float16" }; -const char *stream_write_half_kernel_code[] = { - "__kernel void test_stream_write_half(__global half *src, __global float *dst)\n" - "{\n" - " int tid = get_global_id(0);\n" - "\n" - " dst[tid] = vload_half( tid * 2, src );\n" - "}\n", - - "__kernel void test_stream_write_half2(__global half2 *src, __global float2 *dst)\n" - "{\n" - " int tid = get_global_id(0);\n" - "\n" - " dst[tid] = vload_half2( tid * 2, src );\n" - "}\n", - - "__kernel void test_stream_write_half4(__global half4 *src, __global float4 *dst)\n" - "{\n" - " int tid = get_global_id(0);\n" - "\n" - " dst[tid] = vload_half4( tid * 2, src );\n" - "}\n", - - "__kernel void test_stream_write_half8(__global half8 *src, __global float8 *dst)\n" - "{\n" - " int tid = get_global_id(0);\n" - "\n" - " dst[tid] = vload_half8( tid * 2, src );\n" - "}\n", - - "__kernel void test_stream_write_half16(__global half16 *src, __global float16 *dst)\n" - "{\n" - " int tid = get_global_id(0);\n" - "\n" - " dst[tid] = vload_half16( tid * 2, src );\n" - "}\n" }; - -static const char *half_kernel_name[] = { "test_stream_write_half", "test_stream_write_half2", "test_stream_write_half4", "test_stream_write_half8", "test_stream_write_half16" }; - - const char *stream_write_long_kernel_code[] = { "__kernel void test_stream_write_long(__global long *src, __global long *dst)\n" "{\n" @@ -548,21 +509,6 @@ static int verify_write_float( void *ptr1, void *ptr2, int n ) } -static int verify_write_half( void *ptr1, void *ptr2, int n ) -{ - int i; - cl_half *inptr = (cl_half *)ptr1; - cl_half *outptr = (cl_half *)ptr2; - - for( i = 0; i < n; i++ ){ - if( outptr[i] != inptr[i] ) - return -1; - } - - return 0; -} - - static int verify_write_long( void *ptr1, void *ptr2, int n ) { int i; @@ -1067,41 +1013,6 @@ REGISTER_TEST(write_array_float) } // end write_float_array() -REGISTER_TEST(write_array_half) -{ - float *inptr[5]; - size_t ptrSizes[5]; - int i, j, err; - int (*foo)(void *,void *,int); - MTdata d = init_genrand( gRandomSeed ); - foo = verify_write_half; - - ptrSizes[0] = sizeof( cl_half ); - ptrSizes[1] = ptrSizes[0] << 1; - ptrSizes[2] = ptrSizes[1] << 1; - ptrSizes[3] = ptrSizes[2] << 1; - ptrSizes[4] = ptrSizes[3] << 1; - - for( i = 0; i < 5; i++ ){ - inptr[i] = (float *)malloc(ptrSizes[i] * num_elements); - - for( j = 0; (unsigned int)j < ptrSizes[i] * num_elements / ( ptrSizes[0] * 2 ); j++ ) - inptr[i][j] = get_random_float( -FLT_MAX, FLT_MAX, d ); - } - - err = test_stream_write( device, context, queue, num_elements, sizeof( cl_half ), "half", 5, (void **)inptr, - stream_write_half_kernel_code, half_kernel_name, foo, d ); - - for( i = 0; i < 5; i++ ){ - free( (void *)inptr[i] ); - } - - free_mtdata(d); - return err; - -} // end write_half_array() - - REGISTER_TEST(write_array_long) { cl_long *inptr[5];