diff options
author | Ben Ashbaugh <ben.ashbaugh@intel.com> | 2024-01-30 09:21:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 09:21:38 -0800 |
commit | 7dbf31e57f7fc3cd952f65c0fd985a2d8f40488b (patch) | |
tree | 0ffb76fa2c07f5f2abb5a841df039da4011bed10 | |
parent | d5b7d10db7503c36357cbd8e146324140ce3a882 (diff) | |
download | OpenCL-CTS-7dbf31e57f7fc3cd952f65c0fd985a2d8f40488b.tar.gz |
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.
-rw-r--r-- | test_conformance/math_brute_force/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test_conformance/math_brute_force/main.cpp b/test_conformance/math_brute_force/main.cpp index 74dd5c47..947b9450 100644 --- a/test_conformance/math_brute_force/main.cpp +++ b/test_conformance/math_brute_force/main.cpp @@ -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; } |