Skip to content

Commit 6a0f948

Browse files
author
JackAKirk
committed
Return false if Err == PI_INVALID_VALUE.
Signed-off-by: JackAKirk <[email protected]>
1 parent b4bde0c commit 6a0f948

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/source/detail/device_info.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,12 @@ template <> struct get_device_info<bool, info::device::atomic64> {
240240

241241
bool result = false;
242242

243-
Plugin.call_nocheck<PiApiKind::piDeviceGetInfo>(
243+
RT::PiResult Err = Plugin.call_nocheck<PiApiKind::piDeviceGetInfo>(
244244
dev, pi::cast<RT::PiDeviceInfo>(info::device::atomic64), sizeof(result),
245245
&result, nullptr);
246-
246+
if (Err == PI_INVALID_VALUE) {
247+
return false;
248+
}
247249
return result;
248250
}
249251
};

0 commit comments

Comments
 (0)