fix the reported platform information for math brute force (#1884)

When the math brute force test printed the platform version it always
printed information for the first platform in the system, which could
be different than the platform for the passed-in device.  Fixed by
querying the platform from the passed-in device instead.
This commit is contained in:
Ben Ashbaugh
2024-01-30 09:21:38 -08:00
committed by GitHub
parent d5b7d10db7
commit 7dbf31e57f

View File

@@ -769,10 +769,11 @@ test_status InitCL(cl_device_id device)
IsTininessDetectedBeforeRounding();
cl_platform_id platform;
int err = clGetPlatformIDs(1, &platform, NULL);
int err = clGetDeviceInfo(gDevice, CL_DEVICE_PLATFORM, sizeof(platform),
&platform, NULL);
if (err)
{
print_error(err, "clGetPlatformIDs failed");
print_error(err, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");
return TEST_FAIL;
}