Skip to content

Commit e0e55b9

Browse files
committed
Merge branch 'petr/cts-device-hip' into benie/hip-cts-fixes-combined
2 parents d4e45e1 + c8f5320 commit e0e55b9

File tree

3 files changed

+32
-41
lines changed

3 files changed

+32
-41
lines changed

source/adapters/hip/device.cpp

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,20 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
210210
return ReturnValue(uint64_t{MaxAlloc});
211211
}
212212
case UR_DEVICE_INFO_IMAGE_SUPPORTED: {
213-
return ReturnValue(uint32_t{true});
213+
return ReturnValue(true);
214214
}
215215
case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: {
216216
// This call doesn't match to HIP as it doesn't have images, but instead
217217
// surfaces and textures. No clear call in the HIP API to determine this,
218218
// but some searching found as of SM 2.x 128 are supported.
219219
return ReturnValue(128u);
220220
}
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+
}
221227
case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: {
222228
// This call doesn't match to HIP as it doesn't have images, but instead
223229
// 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,
339345
return ReturnValue(0u);
340346
}
341347
case UR_DEVICE_INFO_SINGLE_FP_CONFIG: {
342-
uint64_t Config =
348+
ur_device_fp_capability_flags_t Config =
343349
UR_DEVICE_FP_CAPABILITY_FLAG_DENORM |
344350
UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN |
345351
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,
350356
return ReturnValue(Config);
351357
}
352358
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;
359366
return ReturnValue(Config);
360367
}
361368
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,
459466
}
460467
case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: {
461468
// 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;
464471
return ReturnValue(Capability);
465472
}
466473
case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES:
467474
case UR_DEVICE_INFO_QUEUE_PROPERTIES: {
468475
// The mandated minimum capability:
469-
uint64_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE;
476+
ur_queue_flags_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE;
470477
return ReturnValue(Capability);
471478
}
472479
case UR_DEVICE_INFO_BUILT_IN_KERNELS: {
@@ -730,9 +737,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
730737
}
731738

732739
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;
736744
return ReturnValue(Capabilities);
737745
}
738746
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,
821829
case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU:
822830
case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH:
823831
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;
825836

826837
default:
827838
break;
Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
{{OPT}}urDeviceCreateWithNativeHandleTest.Success
2-
{{OPT}}urDeviceGetTest.InvalidValueNumEntries
3-
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
4-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_SINGLE_FP_CONFIG
5-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_DOUBLE_FP_CONFIG
6-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_QUEUE_PROPERTIES
7-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_IMAGE_SUPPORTED
8-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS
9-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
10-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
11-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_IL_VERSION
12-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_SUPPORTED_PARTITIONS
13-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_PARTITION_TYPE
14-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_EU_COUNT
15-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH
16-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_EU_SLICES
17-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
18-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
19-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU
20-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH
21-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
22-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_BFLOAT16
23-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ASYNC_BARRIER
24-
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT
1+
urDeviceCreateWithNativeHandleTest.Success
2+
urDeviceGetTest.InvalidValueNumEntries
3+
urDeviceGetGlobalTimestampTest.Success
4+
urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
5+
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_SUPPORTED_PARTITIONS
6+
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_PARTITION_TYPE
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
urQueueCreateTest.InvalidQueueProperties/AMD_HIP_BACKEND___{{.*}}_
2-
urQueueCreateWithParamTest.SuccessWithProperties/AMD_HIP_BACKEND___{{.*}}___UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
3-
urQueueCreateWithParamTest.SuccessWithProperties/AMD_HIP_BACKEND___{{.*}}___UR_QUEUE_FLAG_PROFILING_ENABLE
42
urQueueGetInfoTestWithInfoParam.Success/AMD_HIP_BACKEND___{{.*}}___UR_QUEUE_INFO_DEVICE_DEFAULT
53
urQueueGetInfoTestWithInfoParam.Success/AMD_HIP_BACKEND___{{.*}}___UR_QUEUE_INFO_SIZE

0 commit comments

Comments
 (0)