diff --git a/unified-runtime/source/adapters/opencl/device.cpp b/unified-runtime/source/adapters/opencl/device.cpp index eac2c9fe0bf2c..cdd5061cc2504 100644 --- a/unified-runtime/source/adapters/opencl/device.cpp +++ b/unified-runtime/source/adapters/opencl/device.cpp @@ -1755,6 +1755,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetGlobalTimestamps( // TODO: Cache OpenCL version for each device and platform auto RetErr = hDevice->getDeviceVersion(DevVer); + + if (RetErr == CL_INVALID_OPERATION) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; + } CL_RETURN_ON_FAILURE(RetErr); RetErr = hDevice->Platform->getPlatformVersion(PlatVer);