Skip to content

Commit

Permalink
[HIP] Enable device and system memory scopes for atomic fences
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeWeb committed Mar 7, 2024
1 parent 1992df2 commit c7df3b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE;
return ReturnValue(Capabilities);
}
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
// SYCL2020 4.6.4.2 minimum mandated capabilities for
// atomic_fence/memory_scope_capabilities.
// Because scopes are hierarchical, wider scopes support all narrower
Expand All @@ -759,6 +758,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP;
return ReturnValue(Capabilities);
}
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
uint64_t Capabilities = UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP |
UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE |
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM;
return ReturnValue(Capabilities);
}
case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: {
// SYCL2020 4.6.4.2 minimum mandated capabilities for
// atomic_fence_order_capabilities.
Expand Down

0 comments on commit c7df3b7

Please sign in to comment.