@@ -779,36 +779,19 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
779
779
ur_memory_order_capability_flags_t Capabilities =
780
780
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED |
781
781
UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
782
- UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE |
783
- UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL;
784
- #if __HIP_PLATFORM_NVIDIA__
785
- // Nvidia introduced fence.sc for seq_cst only since SM 7.0.
786
- int Major = 0 ;
787
- UR_CHECK_ERROR (hipDeviceGetAttribute (
788
- &Major, hipDeviceAttributeComputeCapabilityMajor, hDevice->get ()));
789
- if (Major >= 7 )
790
- Capabilities |= UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST;
791
- #else
792
- Capabilities |= UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST;
793
- #endif
782
+ UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE;
794
783
return ReturnValue (Capabilities);
795
784
}
796
785
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
786
+ // SYCL2020 4.6.4.2 minimum mandated capabilities for
787
+ // atomic_fence/memory_scope_capabilities.
788
+ // Because scopes are hierarchical, wider scopes support all narrower
789
+ // scopes. At a minimum, each device must support WORK_ITEM, SUB_GROUP and
790
+ // WORK_GROUP. (https://github.com/KhronosGroup/SYCL-Docs/pull/382)
797
791
ur_memory_scope_capability_flags_t Capabilities =
798
792
UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM |
799
793
UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP |
800
- UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP |
801
- UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE;
802
- #if __HIP_PLATFORM_NVIDIA__
803
- // Nvidia introduced system scope atomics only since SM 6.0.
804
- int Major = 0 ;
805
- UR_CHECK_ERROR (hipDeviceGetAttribute (
806
- &Major, hipDeviceAttributeComputeCapabilityMajor, hDevice->get ()));
807
- if (Major >= 6 )
808
- Capabilities |= UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM;
809
- #else
810
- Capabilities |= UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM;
811
- #endif
794
+ UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP;
812
795
return ReturnValue (Capabilities);
813
796
}
814
797
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
0 commit comments