mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +00:00
Print the latest conformance version passed reported by the device (#959)
Fixes #798 Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
/* Helper to return a string containing device information for the specified
|
/* Helper to return a string containing device information for the specified
|
||||||
* device info parameter. */
|
* device info parameter. */
|
||||||
static std::string get_device_info_string(cl_device_id device,
|
std::string get_device_info_string(cl_device_id device,
|
||||||
cl_device_info param_name)
|
cl_device_info param_name)
|
||||||
{
|
{
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
|
|
||||||
#include <CL/opencl.h>
|
#include <CL/opencl.h>
|
||||||
|
|
||||||
|
/* Helper to return a string containing device information for the specified
|
||||||
|
* device info parameter. */
|
||||||
|
std::string get_device_info_string(cl_device_id device,
|
||||||
|
cl_device_info param_name);
|
||||||
|
|
||||||
/* Determines if an extension is supported by a device. */
|
/* Determines if an extension is supported by a device. */
|
||||||
int is_extension_available(cl_device_id device, const char *extensionName);
|
int is_extension_available(cl_device_id device, const char *extensionName);
|
||||||
|
|
||||||
|
|||||||
@@ -1579,6 +1579,15 @@ int printDeviceHeader( cl_device_id device )
|
|||||||
deviceName, deviceVendor, deviceVersion, ( error == CL_SUCCESS ) ? ", CL C Version = " : "",
|
deviceName, deviceVendor, deviceVersion, ( error == CL_SUCCESS ) ? ", CL C Version = " : "",
|
||||||
( error == CL_SUCCESS ) ? cLangVersion : "" );
|
( error == CL_SUCCESS ) ? cLangVersion : "" );
|
||||||
|
|
||||||
|
auto version = get_device_cl_version(device);
|
||||||
|
if (version >= Version(3, 0))
|
||||||
|
{
|
||||||
|
auto ctsVersion = get_device_info_string(
|
||||||
|
device, CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED);
|
||||||
|
log_info("Device latest conformance version passed: %s\n",
|
||||||
|
ctsVersion.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
return CL_SUCCESS;
|
return CL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user