Skip to content

Commit 61a2fef

Browse files
committed
[HIP] Enable device and system memory scopes for atomic fences
1 parent 1992df2 commit 61a2fef

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source/adapters/hip/device.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -748,16 +748,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
748748
return ReturnValue(Capabilities);
749749
}
750750
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:
751-
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
752-
// SYCL2020 4.6.4.2 minimum mandated capabilities for
753-
// atomic_fence/memory_scope_capabilities.
754-
// Because scopes are hierarchical, wider scopes support all narrower
755-
// scopes. At a minimum, each device must support WORK_ITEM, SUB_GROUP and
756-
// WORK_GROUP. (https://github.com/KhronosGroup/SYCL-Docs/pull/382)
757751
uint64_t Capabilities = UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
758752
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
759753
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP;
760754
return ReturnValue(Capabilities);
755+
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
756+
uint64_t Capabilities = UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
757+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
758+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP |
759+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE |
760+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM;
761+
return ReturnValue(Capabilities);
761762
}
762763
case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: {
763764
// SYCL2020 4.6.4.2 minimum mandated capabilities for

0 commit comments

Comments
 (0)