Skip to content

Commit 2c9c407

Browse files
author
Georgi Mirazchiyski
committed
[HIP] Enable device and system memory scopes for atomic fences
1 parent c09dbef commit 2c9c407

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

source/adapters/hip/device.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
785785
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE;
786786
return ReturnValue(Capabilities);
787787
}
788-
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:
789-
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
788+
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
790789
// SYCL2020 4.6.4.2 minimum mandated capabilities for
791790
// atomic_fence/memory_scope_capabilities.
792791
// Because scopes are hierarchical, wider scopes support all narrower
@@ -798,6 +797,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
798797
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP;
799798
return ReturnValue(Capabilities);
800799
}
800+
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
801+
uint64_t Capabilities = UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
802+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
803+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP |
804+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE |
805+
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM;
806+
return ReturnValue(Capabilities);
807+
}
801808
case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: {
802809
// SYCL2020 4.6.4.2 minimum mandated capabilities for
803810
// atomic_fence_order_capabilities.

0 commit comments

Comments
 (0)