mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Update List of Skipped Tests in Offline Mode (#840)
* Fix Tests Assuming Online Compilation in Offline MOde * Update the list of tests to skip in offline mode. These tests need to be skipped for offline-binary mode since they make API calls that rely on a compiler being present in the runtime. - [x] Skip `get_kernel_arg_info_compatibility` since it makes calls to `clBuildProgram`. (these tests cannot be run in offline mode since: *Kernel argument information is only available if the program object associated with kernel is created with `clCreateProgramWithSource` and the program executable was built with the `-cl-kernel-arg-info` option specified in options argument to `clBuildProgram` or `clCompileProgram` .*) - [x] Skip `compiler` tests that make calls to `clCompileProgram`. These tests could still be run in offline spirv mode if there is a compiler in the driver. - [x] Use offline compilation path in `contractions` in the case that CTS is run in offline. * Avoid shadowing `error` variable Co-authored-by: Ewan Crawford <ewan@codeplay.com>
This commit is contained in:
@@ -707,47 +707,63 @@ const char * subtests_requiring_opencl_1_2[] = {
|
||||
"popcount"
|
||||
};
|
||||
|
||||
const char * subtests_to_skip_with_offline_compiler[] = {
|
||||
"get_kernel_arg_info",
|
||||
"binary_create",
|
||||
"load_program_source",
|
||||
"load_multistring_source",
|
||||
"load_two_kernel_source",
|
||||
"load_null_terminated_source",
|
||||
"load_null_terminated_multi_line_source",
|
||||
"load_null_terminated_partial_multi_line_source",
|
||||
"load_discreet_length_source",
|
||||
"get_program_source",
|
||||
"get_program_build_info",
|
||||
"options_build_optimizations",
|
||||
"options_build_macro",
|
||||
"options_build_macro_existence",
|
||||
"options_include_directory",
|
||||
"options_denorm_cache",
|
||||
"preprocessor_define_udef",
|
||||
"preprocessor_include",
|
||||
"preprocessor_line_error",
|
||||
"preprocessor_pragma",
|
||||
"compiler_defines_for_extensions",
|
||||
"image_macro",
|
||||
"simple_extern_compile_only",
|
||||
"simple_embedded_header_compile",
|
||||
"two_file_regular_variable_access",
|
||||
"two_file_regular_struct_access",
|
||||
"two_file_regular_function_access",
|
||||
"simple_embedded_header_link",
|
||||
"execute_after_simple_compile_and_link_with_defines",
|
||||
"execute_after_simple_compile_and_link_with_callbacks",
|
||||
"execute_after_embedded_header_link",
|
||||
"execute_after_included_header_link",
|
||||
"multi_file_libraries",
|
||||
"multiple_files",
|
||||
"multiple_libraries",
|
||||
"multiple_files_multiple_libraries",
|
||||
"multiple_embedded_headers",
|
||||
"program_binary_type",
|
||||
"compile_and_link_status_options_log",
|
||||
"kernel_preprocessor_macros",
|
||||
const char *subtests_to_skip_with_offline_compiler[] = {
|
||||
"get_kernel_arg_info",
|
||||
"get_kernel_arg_info_compatibility",
|
||||
"binary_create",
|
||||
"load_program_source",
|
||||
"load_multistring_source",
|
||||
"load_two_kernel_source",
|
||||
"load_null_terminated_source",
|
||||
"load_null_terminated_multi_line_source",
|
||||
"load_null_terminated_partial_multi_line_source",
|
||||
"load_discreet_length_source",
|
||||
"get_program_source",
|
||||
"get_program_build_info",
|
||||
"options_build_optimizations",
|
||||
"options_build_macro",
|
||||
"options_build_macro_existence",
|
||||
"options_include_directory",
|
||||
"options_denorm_cache",
|
||||
"preprocessor_define_udef",
|
||||
"preprocessor_include",
|
||||
"preprocessor_line_error",
|
||||
"preprocessor_pragma",
|
||||
"compiler_defines_for_extensions",
|
||||
"image_macro",
|
||||
"simple_extern_compile_only",
|
||||
"simple_embedded_header_compile",
|
||||
"two_file_regular_variable_access",
|
||||
"two_file_regular_struct_access",
|
||||
"two_file_regular_function_access",
|
||||
"simple_embedded_header_link",
|
||||
"execute_after_simple_compile_and_link_with_defines",
|
||||
"execute_after_simple_compile_and_link_with_callbacks",
|
||||
"execute_after_embedded_header_link",
|
||||
"execute_after_included_header_link",
|
||||
"multi_file_libraries",
|
||||
"multiple_files",
|
||||
"multiple_libraries",
|
||||
"multiple_files_multiple_libraries",
|
||||
"multiple_embedded_headers",
|
||||
"program_binary_type",
|
||||
"compile_and_link_status_options_log",
|
||||
"kernel_preprocessor_macros",
|
||||
"execute_after_serialize_reload_library",
|
||||
"execute_after_serialize_reload_object",
|
||||
"execute_after_simple_compile_and_link",
|
||||
"execute_after_simple_compile_and_link_no_device_info",
|
||||
"execute_after_simple_library_with_link",
|
||||
"execute_after_two_file_link",
|
||||
"simple_compile_only",
|
||||
"simple_compile_with_callback",
|
||||
"simple_library_only",
|
||||
"simple_library_with_callback",
|
||||
"simple_library_with_link",
|
||||
"simple_link_only",
|
||||
"simple_link_with_callback",
|
||||
"simple_static_compile_only",
|
||||
"two_file_link",
|
||||
};
|
||||
|
||||
int check_functions_for_offline_compiler(const char *subtestname, cl_device_id device)
|
||||
|
||||
@@ -576,56 +576,39 @@ test_status InitCL( cl_device_id device )
|
||||
"}\n"
|
||||
"\n" };
|
||||
|
||||
for( i = 0; i < sizeof( sizeNames ) / sizeof( sizeNames[0] ); i++ )
|
||||
for (i = 0; i < sizeof(sizeNames) / sizeof(sizeNames[0]); i++)
|
||||
{
|
||||
size_t strCount = sizeof( kernels ) / sizeof( kernels[0] );
|
||||
size_t strCount = sizeof(kernels) / sizeof(kernels[0]);
|
||||
kernels[0] = "";
|
||||
|
||||
for( j = 2; j < strCount; j += 2 )
|
||||
kernels[j] = sizeNames[i];
|
||||
|
||||
gProgram[i] = clCreateProgramWithSource(gContext, strCount, kernels, NULL, &error);
|
||||
if( NULL == gProgram[i] )
|
||||
for (j = 2; j < strCount; j += 2) kernels[j] = sizeNames[i];
|
||||
error = create_single_kernel_helper(gContext, &gProgram[i], nullptr,
|
||||
strCount, kernels, nullptr);
|
||||
if (CL_SUCCESS != error || nullptr == gProgram[i])
|
||||
{
|
||||
vlog_error( "clCreateProgramWithSource failed\n" );
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if(( error = clBuildProgram(gProgram[i], 1, &device, NULL, NULL, NULL) ))
|
||||
{
|
||||
vlog_error( "clBuildProgramExecutable failed\n" );
|
||||
char build_log[2048] = "";
|
||||
|
||||
clGetProgramBuildInfo(gProgram[i], device, CL_PROGRAM_BUILD_LOG, sizeof(build_log), build_log, NULL);
|
||||
vlog_error( "Log:\n%s\n", build_log );
|
||||
log_error("Error: Unable to create test program! (%s) (in %s:%d)\n",
|
||||
IGetErrorString(error), __FILE__, __LINE__);
|
||||
return TEST_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if( gHasDouble )
|
||||
if (gHasDouble)
|
||||
{
|
||||
kernels[0] = "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n";
|
||||
for( i = 0; i < sizeof( sizeNames_double ) / sizeof( sizeNames_double[0] ); i++ )
|
||||
for (i = 0; i < sizeof(sizeNames_double) / sizeof(sizeNames_double[0]);
|
||||
i++)
|
||||
{
|
||||
size_t strCount = sizeof( kernels ) / sizeof( kernels[0] );
|
||||
size_t strCount = sizeof(kernels) / sizeof(kernels[0]);
|
||||
|
||||
for( j = 2; j < strCount; j += 2 )
|
||||
kernels[j] = sizeNames_double[i];
|
||||
|
||||
gProgram_double[i] = clCreateProgramWithSource(gContext, strCount, kernels, NULL, &error);
|
||||
if( NULL == gProgram_double[i] )
|
||||
for (j = 2; j < strCount; j += 2) kernels[j] = sizeNames_double[i];
|
||||
error = create_single_kernel_helper(gContext, &gProgram_double[i],
|
||||
nullptr, strCount, kernels,
|
||||
nullptr);
|
||||
if (CL_SUCCESS != error || nullptr == gProgram_double[i])
|
||||
{
|
||||
vlog_error( "clCreateProgramWithSource failed\n" );
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if(( error = clBuildProgram(gProgram_double[i], 1, &device, NULL, NULL, NULL) ))
|
||||
{
|
||||
vlog_error( "clBuildProgramExecutable failed\n" );
|
||||
char build_log[2048] = "";
|
||||
|
||||
clGetProgramBuildInfo(gProgram_double[i], device, CL_PROGRAM_BUILD_LOG, sizeof(build_log), build_log, NULL);
|
||||
vlog_error( "Log:\n%s\n", build_log );
|
||||
log_error(
|
||||
"Error: Unable to create test program! (%s) (in %s:%d)\n",
|
||||
IGetErrorString(error), __FILE__, __LINE__);
|
||||
return TEST_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user