diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLBufferFromImage.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLBufferFromImage.cpp index 7e33da11dd..9d83583720 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLBufferFromImage.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLBufferFromImage.cpp @@ -80,6 +80,16 @@ void OCLBufferFromImage::open(unsigned int test, char *units, return; } + cl_bool imageSupport; + size_t size; + _wrapper->clGetDeviceInfo(devices_[deviceId], CL_DEVICE_IMAGE_SUPPORT, + sizeof(imageSupport), &imageSupport, &size); + if (!imageSupport) { + testDescString = "Image not supported, skipping this test! "; + done = true; + return; + } + clCreateBufferFromImageAMD = (clCreateBufferFromImageAMD_fn)clGetExtensionFunctionAddressForPlatform( platform_, "clCreateBufferFromImageAMD"); diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.cpp index 5f778d09df..59661e9b81 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.cpp @@ -83,7 +83,7 @@ const static char *strKernel = OCLCreateImage::OCLCreateImage() { _numSubTests = MaxSubTests; - failed_ = false; + done_ = false; ImageSizeX = ImageSize; ImageSizeY = ImageSize; ImageSizeZ = ImageSize; @@ -103,7 +103,8 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion, _wrapper->clGetDeviceInfo(devices_[i], CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupport), &imageSupport, &size); if (!imageSupport) { - failed_ = true; + testDescString = "Image not supported, skipping this test! "; + done_ = true; return; } } @@ -461,11 +462,7 @@ static void CL_CALLBACK notify_callback(const char *errinfo, void *user_data) {} void OCLCreateImage::run(void) { - if (failed_) { - printf ("\n"); - printf ("**********************************************************\n"); - printf ("* WARNING: Test skip. Image may not be supported in OCL. *\n"); - printf ("**********************************************************\n"); + if (done_) { return; } diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.h b/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.h index 08a788ba45..8238bb1fda 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.h +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLCreateImage.h @@ -35,7 +35,7 @@ class OCLCreateImage : public OCLTestImp { virtual unsigned int close(void); private: - bool failed_; + bool done_; unsigned int testID_; size_t maxSize_; size_t ImageSizeX; diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp index 2b297a2e9c..427b4c04a6 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp @@ -112,9 +112,9 @@ static const AMDDeviceInfo DeviceInfo[] = { /* Navi24 */ { "gfx1034", "gfx1034", 4, 32, 1, 256, 64 * Ki, 32, 10, 3 }, /* Rembrandt */{ "gfx1035", "gfx1035", 4, 32, 1, 256, 64 * Ki, 32, 10, 3 }, /* Raphael */ { "gfx1036", "gfx1036", 4, 32, 1, 256, 64 * Ki, 32, 10, 3 }, - { "gfx1100", "gfx1100", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, - { "gfx1101", "gfx1101", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, - { "gfx1102", "gfx1102", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, + /* Navi31*/ { "gfx1100", "gfx1100", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, + /* Navi32*/ { "gfx1101", "gfx1101", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, + /* Navi33*/ { "gfx1102", "gfx1102", 4, 32, 1, 256, 64 * Ki, 32, 11, 0 }, }; const int DeviceInfoSize = sizeof(DeviceInfo) / sizeof(AMDDeviceInfo); diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.cpp index 0ac9819832..f604db5a62 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.cpp @@ -66,7 +66,7 @@ OCLImage2DFromBuffer::~OCLImage2DFromBuffer() {} void OCLImage2DFromBuffer::open(unsigned int test, char *units, double &conversion, unsigned int deviceId) { buffer = clImage2DOriginal = clImage2D = clImage2DOut = NULL; - done = false; + done_ = false; pitchAlignment = 0; _openTest = test; @@ -83,7 +83,17 @@ void OCLImage2DFromBuffer::open(unsigned int test, char *units, if (!(deviceType & CL_DEVICE_TYPE_GPU)) { testDescString = "GPU device is required for this test!\n"; - done = true; + done_ = true; + return; + } + + cl_bool imageSupport; + size_t size; + _wrapper->clGetDeviceInfo(devices_[deviceId], CL_DEVICE_IMAGE_SUPPORT, + sizeof(imageSupport), &imageSupport, &size); + if (!imageSupport) { + testDescString = "Image not supported, skipping this test! "; + done_ = true; return; } @@ -93,7 +103,7 @@ void OCLImage2DFromBuffer::open(unsigned int test, char *units, platform_, "clConvertImageAMD"); if (clConvertImageAMD == NULL) { testDescString = "clConvertImageAMD not found!\n"; - done = true; + done_ = true; return; } } @@ -103,7 +113,7 @@ void OCLImage2DFromBuffer::open(unsigned int test, char *units, } void OCLImage2DFromBuffer::run(void) { - if (_errorFlag || done) { + if (_errorFlag || done_) { return; } @@ -231,7 +241,7 @@ void OCLImage2DFromBuffer::AllocateOpenCLImage() { "status!=CL_INVALID_IMAGE_FORMAT_DESCRIPTOR) <=> (%p, %x)", clImage2D, status); if (requiredPitch != pitch) { - done = true; + done_ = true; return; } } diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.h b/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.h index b8ada52bff..8d105dda69 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.h +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLImage2DFromBuffer.h @@ -43,7 +43,7 @@ class OCLImage2DFromBuffer : public OCLTestImp { void CopyOpenCLImage(cl_mem clImageSrc); void CompileKernel(); - bool done; + bool done_; size_t blockSizeX; /**< Work-group size in x-direction */ size_t blockSizeY; /**< Work-group size in y-direction */ cl_mem buffer; diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.cpp index b90ff1a25e..e6a040ebbc 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.cpp @@ -50,7 +50,10 @@ const static char* strKernel = "} \n" " \n"; -OCLLinearFilter::OCLLinearFilter() { _numSubTests = 2; } +OCLLinearFilter::OCLLinearFilter() { + done_ = false; + _numSubTests = 2; +} OCLLinearFilter::~OCLLinearFilter() {} @@ -65,6 +68,8 @@ void OCLLinearFilter::open(unsigned int test, char* units, double& conversion, _wrapper->clGetDeviceInfo(devices_[i], CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupport), &imageSupport, &size); if (!imageSupport) { + testDescString = "Image not supported, skipping this test! "; + done_ = true; return; } } @@ -147,15 +152,10 @@ static void CL_CALLBACK notify_callback(const char* errinfo, void* user_data) {} void OCLLinearFilter::run(void) { - cl_bool imageSupport; - size_t size; - for (size_t i = 0; i < deviceCount_; ++i) { - _wrapper->clGetDeviceInfo(devices_[i], CL_DEVICE_IMAGE_SUPPORT, - sizeof(imageSupport), &imageSupport, &size); - if (!imageSupport) { - return; - } + if (done_) { + return; } + cl_float values[4] = {0.f, 0.f, 0.f, 0.f}; cl_float ref[2] = {1.75f, 1.25f}; cl_mem image = buffers()[0]; diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.h b/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.h index f1217454af..a896ba0f60 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.h +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLLinearFilter.h @@ -33,6 +33,9 @@ class OCLLinearFilter : public OCLTestImp { unsigned int deviceID); virtual void run(void); virtual unsigned int close(void); + + private: + bool done_; }; #endif // _OCL_LINEAR_FILTER_H_ diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.cpp b/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.cpp index e988627a93..60f63e35e4 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.cpp +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.cpp @@ -70,7 +70,7 @@ static const char *rgba8888_kernel_write = OCLReadWriteImage::OCLReadWriteImage() { _numSubTests = MaxSubTests; - failed_ = false; + done_ = false; imageWidth = imageSize; imageHeight = imageSize; imageDepth = imageSize; @@ -104,7 +104,8 @@ void OCLReadWriteImage::open(unsigned int test, char *units, double &conversion, _wrapper->clGetDeviceInfo(devices_[i], CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupport), &imageSupport, &size); if (!imageSupport) { - failed_ = true; + testDescString = "Image not supported, skipping this test! "; + done_ = true; return; } } @@ -174,7 +175,7 @@ static void CL_CALLBACK notify_callback(const char *errinfo, void *user_data) {} void OCLReadWriteImage::run(void) { - if (failed_) { + if (done_) { return; } diff --git a/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.h b/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.h index f12e7ba7d2..a9a2128503 100644 --- a/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.h +++ b/projects/clr/opencl/tests/ocltst/module/runtime/OCLReadWriteImage.h @@ -35,7 +35,7 @@ class OCLReadWriteImage : public OCLTestImp { virtual unsigned int close(void); private: - bool failed_; + bool done_; unsigned int testID_; size_t maxSize_; size_t imageWidth;