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,
201
201
UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
202
202
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE |
203
203
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
+
204
211
return ReturnValue (Capabilities);
205
212
}
206
213
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,
228
235
UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
229
236
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE |
230
237
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
+
231
245
return ReturnValue (Capabilities);
232
246
}
233
247
case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
You can’t perform that action at this time.
0 commit comments