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 d48c405 commit b8e3243
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,16 +748,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
return ReturnValue(Capabilities);
}
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:
case UR_DEVICE_INFO_ATOMIC_FENCE_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
// scopes. At a minimum, each device must support WORK_ITEM, SUB_GROUP and
// WORK_GROUP. (https://github.com/KhronosGroup/SYCL-Docs/pull/382)
uint64_t Capabilities = UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
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
Expand Down

0 comments on commit b8e3243

Please sign in to comment.