mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add CL_DEVICE_NAME to clDeviceInfo File (#836)
- [x] Add `CL_DEVICE_NAME` to list of device properties printed into the clDeviceInfo file for offline compilation testing. - [x] Add `get_device_name` helper function. - [x] Update offline compiler interface explanation file with `CL_DEVICE_NAME` and `CL_DEVICE_IMAGE_SUPPORT` which was missed from this file when added.
This commit is contained in:
@@ -23,3 +23,5 @@ It is of the following form:
|
|||||||
CL_DEVICE_EXTENSIONS="<space separated list of CL extensions>"
|
CL_DEVICE_EXTENSIONS="<space separated list of CL extensions>"
|
||||||
CL_DEVICE_IL_VERSION="<space separated list of IL versions>"
|
CL_DEVICE_IL_VERSION="<space separated list of IL versions>"
|
||||||
CL_DEVICE_VERSION="OpenCL <version> <vendor info>"
|
CL_DEVICE_VERSION="OpenCL <version> <vendor info>"
|
||||||
|
CL_DEVICE_IMAGE_SUPPORT=<0|1>
|
||||||
|
CL_DEVICE_NAME="device name"
|
||||||
|
|||||||
@@ -79,3 +79,9 @@ std::string get_device_version_string(cl_device_id device)
|
|||||||
{
|
{
|
||||||
return get_device_info_string(device, CL_DEVICE_VERSION);
|
return get_device_info_string(device, CL_DEVICE_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns a string containing the device name. */
|
||||||
|
std::string get_device_name(cl_device_id device)
|
||||||
|
{
|
||||||
|
return get_device_info_string(device, CL_DEVICE_NAME);
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,4 +35,6 @@ std::string get_device_il_version_string(cl_device_id device);
|
|||||||
/* Returns a string containing the supported OpenCL version for a device. */
|
/* Returns a string containing the supported OpenCL version for a device. */
|
||||||
std::string get_device_version_string(cl_device_id device);
|
std::string get_device_version_string(cl_device_id device);
|
||||||
|
|
||||||
|
/* Returns a string containing the device name. */
|
||||||
|
std::string get_device_name(cl_device_id device);
|
||||||
#endif // _deviceInfo_h
|
#endif // _deviceInfo_h
|
||||||
|
|||||||
@@ -374,6 +374,8 @@ static cl_int get_cl_device_info_str(const cl_device_id device, const cl_uint de
|
|||||||
clDeviceInfoStream << "CL_DEVICE_VERSION=\"" << versionString << "\"" << std::endl;
|
clDeviceInfoStream << "CL_DEVICE_VERSION=\"" << versionString << "\"" << std::endl;
|
||||||
clDeviceInfoStream << "CL_DEVICE_IMAGE_SUPPORT="
|
clDeviceInfoStream << "CL_DEVICE_IMAGE_SUPPORT="
|
||||||
<< (0 == checkForImageSupport(device)) << std::endl;
|
<< (0 == checkForImageSupport(device)) << std::endl;
|
||||||
|
clDeviceInfoStream << "CL_DEVICE_NAME=\"" << get_device_name(device).c_str()
|
||||||
|
<< "\"" << std::endl;
|
||||||
|
|
||||||
clDeviceInfo = clDeviceInfoStream.str();
|
clDeviceInfo = clDeviceInfoStream.str();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user