File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
201201 UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
202202 UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE |
203203 UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL;
204+
205+ int Major = 0 ;
206+ UR_CHECK_ERROR (cuDeviceGetAttribute (
207+ &Major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, hDevice->get ()));
208+ if (Major >= 7 )
209+ Capabilities |= UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST;
210+
204211 return ReturnValue (Capabilities);
205212 }
206213 case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
@@ -228,6 +235,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
228235 UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
229236 UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE |
230237 UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL;
238+
239+ int Major = 0 ;
240+ UR_CHECK_ERROR (cuDeviceGetAttribute (
241+ &Major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, hDevice->get ()));
242+ if (Major >= 7 )
243+ Capabilities |= UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST;
244+
231245 return ReturnValue (Capabilities);
232246 }
233247 case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
You can’t perform that action at this time.
0 commit comments