diff options
| author | Joseph Huber <huberjn@outlook.com> | 2025-05-28 08:51:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-28 08:51:14 -0500 |
| commit | 0ebe5557d9688f7397d45facb26efcd3f2c3bc8c (patch) | |
| tree | 6da2aea28be6c8ae341c5097e80c115d43b7e635 /offload/unittests/OffloadAPI/device | |
| parent | 06ee672fc5222009d38fa8334b0b5438645f2a66 (diff) | |
[Offload] Add specifier for the host type (#141635)
Summary:
We use this sepcial type to indicate a host value, this will be refined
later but for now it's used as a stand-in device for transfers and
queues. It needs a special kind because it is not a device target as the
other ones so we need to differentiate it between a CPU and GPU type.
Fixes: https://github.com/llvm/llvm-project/issues/141436
Diffstat (limited to 'offload/unittests/OffloadAPI/device')
| -rw-r--r-- | offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp index 1240f219813e..0247744911ea 100644 --- a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp +++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp @@ -19,6 +19,13 @@ TEST_P(olGetDeviceInfoTest, SuccessType) { sizeof(ol_device_type_t), &DeviceType)); } +TEST_P(olGetDeviceInfoTest, HostSuccessType) { + ol_device_type_t DeviceType; + ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE, + sizeof(ol_device_type_t), &DeviceType)); + ASSERT_EQ(DeviceType, OL_DEVICE_TYPE_HOST); +} + TEST_P(olGetDeviceInfoTest, SuccessPlatform) { ol_platform_handle_t Platform = nullptr; ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_PLATFORM, |
