Skip to content

Commit 04a72dd

Browse files
authored
[SYCL][UR] Fix conversion OpenCL return code to UR (#20152)
Change to limit possible return values of the `urDeviceGetGlobalTimestamps` to the documented ones. According to: https://oneapi-src.github.io/unified-runtime/core/api.html#urdevicegetglobaltimestamps Related with: #18863
1 parent c954457 commit 04a72dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unified-runtime/source/adapters/opencl/device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetGlobalTimestamps(
17671767

17681768
// TODO: Cache OpenCL version for each device and platform
17691769
auto RetErr = hDevice->getDeviceVersion(DevVer);
1770+
1771+
if (RetErr == CL_INVALID_OPERATION) {
1772+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
1773+
}
17701774
CL_RETURN_ON_FAILURE(RetErr);
17711775

17721776
RetErr = hDevice->Platform->getPlatformVersion(PlatVer);

0 commit comments

Comments
 (0)