@@ -210,14 +210,20 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
210
210
return ReturnValue (uint64_t {MaxAlloc});
211
211
}
212
212
case UR_DEVICE_INFO_IMAGE_SUPPORTED: {
213
- return ReturnValue (uint32_t { true } );
213
+ return ReturnValue (true );
214
214
}
215
215
case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: {
216
216
// This call doesn't match to HIP as it doesn't have images, but instead
217
217
// surfaces and textures. No clear call in the HIP API to determine this,
218
218
// but some searching found as of SM 2.x 128 are supported.
219
219
return ReturnValue (128u );
220
220
}
221
+ case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: {
222
+ // This call doesn't match to HIP as it doesn't have images, but instead
223
+ // surfaces and textures. No clear call in the HIP API to determine this,
224
+ // but some searching found as of SM 2.x 128 are supported.
225
+ return ReturnValue (128u );
226
+ }
221
227
case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: {
222
228
// This call doesn't match to HIP as it doesn't have images, but instead
223
229
// surfaces and textures. No clear call in the HIP API to determine this,
@@ -339,7 +345,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
339
345
return ReturnValue (0u );
340
346
}
341
347
case UR_DEVICE_INFO_SINGLE_FP_CONFIG: {
342
- uint64_t Config =
348
+ ur_device_fp_capability_flags_t Config =
343
349
UR_DEVICE_FP_CAPABILITY_FLAG_DENORM |
344
350
UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN |
345
351
UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST |
@@ -350,12 +356,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
350
356
return ReturnValue (Config);
351
357
}
352
358
case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: {
353
- uint64_t Config = UR_DEVICE_FP_CAPABILITY_FLAG_DENORM |
354
- UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN |
355
- UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST |
356
- UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO |
357
- UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF |
358
- UR_DEVICE_FP_CAPABILITY_FLAG_FMA;
359
+ ur_device_fp_capability_flags_t Config =
360
+ UR_DEVICE_FP_CAPABILITY_FLAG_DENORM |
361
+ UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN |
362
+ UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST |
363
+ UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO |
364
+ UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF |
365
+ UR_DEVICE_FP_CAPABILITY_FLAG_FMA;
359
366
return ReturnValue (Config);
360
367
}
361
368
case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: {
@@ -459,14 +466,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
459
466
}
460
467
case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: {
461
468
// The mandated minimum capability:
462
- uint64_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE |
463
- UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE;
469
+ ur_queue_flags_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE |
470
+ UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE;
464
471
return ReturnValue (Capability);
465
472
}
466
473
case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES:
467
474
case UR_DEVICE_INFO_QUEUE_PROPERTIES: {
468
475
// The mandated minimum capability:
469
- uint64_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE;
476
+ ur_queue_flags_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE;
470
477
return ReturnValue (Capability);
471
478
}
472
479
case UR_DEVICE_INFO_BUILT_IN_KERNELS: {
@@ -730,9 +737,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
730
737
}
731
738
732
739
case UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: {
733
- uint64_t Capabilities = UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED |
734
- UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
735
- UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE;
740
+ ur_memory_order_capability_flags_t Capabilities =
741
+ UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED |
742
+ UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE |
743
+ UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE;
736
744
return ReturnValue (Capabilities);
737
745
}
738
746
case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:
@@ -821,7 +829,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
821
829
case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU:
822
830
case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH:
823
831
case UR_DEVICE_INFO_BFLOAT16:
824
- return UR_RESULT_ERROR_INVALID_ENUMERATION;
832
+ case UR_DEVICE_INFO_IL_VERSION:
833
+ case UR_DEVICE_INFO_ASYNC_BARRIER:
834
+ case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT:
835
+ return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
825
836
826
837
default :
827
838
break ;
0 commit comments