Skip to content

Commit

Permalink
Delete read_array_half and write_array_half tests (#2212)
Browse files Browse the repository at this point in the history
These tests are broken, have been disabled for the longest time, and
don't add significant value.

Signed-off-by: Kevin Petit <[email protected]>
  • Loading branch information
kpet authored Jan 7, 2025
1 parent 34feb6e commit 6fc3870
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 152 deletions.
63 changes: 0 additions & 63 deletions test_conformance/profiling/readArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
89 changes: 0 additions & 89 deletions test_conformance/profiling/writeArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 6fc3870

Please sign in to comment.