Don't require support for 3D image writes in tests that don't need it (#1003)

Also fix PASSIVE_REQUIRE_* macros to report tests as skipped instead of passed.

Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
Kévin Petit
2020-10-05 18:20:51 +01:00
committed by GitHub
parent 7a735b74e3
commit 020eea9e52
4 changed files with 38 additions and 24 deletions

View File

@@ -152,25 +152,28 @@ size_t get_min_alignment(cl_context context);
/* Helper to obtain the default rounding mode for single precision computation. (Double is always CL_FP_ROUND_TO_NEAREST.) Returns 0 on error. */
cl_device_fp_config get_default_rounding_mode( cl_device_id device );
#define PASSIVE_REQUIRE_IMAGE_SUPPORT( device ) \
if( checkForImageSupport( device ) ) \
{ \
log_info( "\n\tNote: device does not support images. Skipping test...\n" ); \
return 0; \
#define PASSIVE_REQUIRE_IMAGE_SUPPORT(device) \
if (checkForImageSupport(device)) \
{ \
log_info( \
"\n\tNote: device does not support images. Skipping test...\n"); \
return TEST_SKIPPED_ITSELF; \
}
#define PASSIVE_REQUIRE_3D_IMAGE_SUPPORT( device ) \
if( checkFor3DImageSupport( device ) ) \
{ \
log_info( "\n\tNote: device does not support 3D images. Skipping test...\n" ); \
return 0; \
#define PASSIVE_REQUIRE_3D_IMAGE_SUPPORT(device) \
if (checkFor3DImageSupport(device)) \
{ \
log_info("\n\tNote: device does not support 3D images. Skipping " \
"test...\n"); \
return TEST_SKIPPED_ITSELF; \
}
#define PASSIVE_REQUIRE_FP16_SUPPORT(device) \
if (!is_extension_available(device, "cl_khr_fp16")) \
{ \
log_info("\n\tNote: device does not support fp16. Skipping test...\n"); \
return 0; \
#define PASSIVE_REQUIRE_FP16_SUPPORT(device) \
if (!is_extension_available(device, "cl_khr_fp16")) \
{ \
log_info( \
"\n\tNote: device does not support fp16. Skipping test...\n"); \
return TEST_SKIPPED_ITSELF; \
}
/* Prints out the standard device header for all tests given the device to print for */