Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2612638

Browse files
committedMar 14, 2024
Simplify graph aspect checks
1 parent c17e6c6 commit 2612638

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed
 

‎sycl/source/detail/device_impl.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -603,18 +603,8 @@ bool device_impl::has(aspect Aspect) const {
603603
return Result != nullptr;
604604
}
605605
case aspect::ext_oneapi_graph: {
606-
pi_bool SupportsCommandBuffers = false;
607-
bool CallSuccessful =
608-
getPlugin()->call_nocheck<PiApiKind::piDeviceGetInfo>(
609-
MDevice, PI_EXT_ONEAPI_DEVICE_INFO_COMMAND_BUFFER_SUPPORT,
610-
sizeof(SupportsCommandBuffers), &SupportsCommandBuffers,
611-
nullptr) == PI_SUCCESS;
612-
if (!CallSuccessful) {
613-
return PI_FALSE;
614-
}
615-
616606
pi_bool SupportsCommandBufferUpdate = false;
617-
CallSuccessful =
607+
bool CallSuccessful =
618608
getPlugin()->call_nocheck<PiApiKind::piDeviceGetInfo>(
619609
MDevice, PI_EXT_ONEAPI_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT,
620610
sizeof(SupportsCommandBufferUpdate), &SupportsCommandBufferUpdate,
@@ -623,7 +613,7 @@ bool device_impl::has(aspect Aspect) const {
623613
return PI_FALSE;
624614
}
625615

626-
return SupportsCommandBuffers && SupportsCommandBufferUpdate;
616+
return has(aspect::ext_oneapi_limited_graph) && SupportsCommandBufferUpdate;
627617
}
628618
case aspect::ext_oneapi_limited_graph: {
629619
pi_bool SupportsCommandBuffers = false;

0 commit comments

Comments
 (0)
Please sign in to comment.