Skip to content

Latest commit

 

History

History
130 lines (119 loc) · 4.16 KB

intel_device_info.asciidoc

File metadata and controls

130 lines (119 loc) · 4.16 KB

Test plan for Intel’s Extensions for Device Information

This is a test plan for the APIs described in sycl_ext_intel_device_info

1. Testing scope

1.1. Device coverage

All of the tests described below are performed only on the default device that is selected on the CTS command line.

1.2. Feature test macro

All of the tests should use #ifdef SYCL_EXT_INTEL_DEVICE_INFO so they can be skipped if feature is not supported.

2. Tests

Run the code in the sections below to check if device has aspect for this info and check type of get_info() with this info.

2.1. Device ID

if (dev.has(aspect::ext_intel_device_id)) {
    auto ID = dev.get_info<ext::intel::info::device::device_id>();
    if (!std::is_same_v<decltype(ID), uint32_t>) { /* test failed */ }
}

2.2. Device UUID

if (dev.has(aspect::ext_intel_device_info_uuid)) {
    auto UUID = dev.get_info<ext::intel::info::device::uuid>();
    if (!std::is_same_v<decltype(UUID), std::array<unsigned char, 16>>) { /* test failed */ }
}

2.3. PCI Address

if (dev.has(aspect::ext_intel_pci_address)) {
    auto BDF = dev.get_info<ext::intel::info::device::pci_address>();
    if (!std::is_same_v<decltype(BDF), std::string>) { /* test failed */ }
}

2.4. Intel GPU Execution Unit SIMD Width

if (dev.has(aspect::ext_intel_gpu_eu_simd_width)) {
    auto euSimdWidth = dev.get_info<ext::intel::info::device::gpu_eu_simd_width>();
    if (!std::is_same_v<decltype(euSimdWidth), uint32_t>) { /* test failed */ }
}

2.5. Intel GPU Execution Unit Count

if (dev.has(aspect::ext_intel_gpu_eu_count)) {
    auto euCount = dev.get_info<ext::intel::info::device::gpu_eu_count>();
    if (!std::is_same_v<decltype(euCount), uint32_t>) { /* test failed */ }
}

2.6. Intel GPU Number of Slices

if (dev.has(aspect::ext_intel_gpu_slices)) {
    auto slices = dev.get_info<ext::intel::info::device::gpu_slices>();
    if (!std::is_same_v<decltype(slices), uint32_t>) { /* test failed */ }
}

2.7. Intel GPU Number of Subslices per Slice

if (dev.has(aspect::ext_intel_gpu_subslices_per_slice)) {
    auto subslices = dev.get_info<ext::intel::info::device::gpu_subslices_per_slice>();
    if (!std::is_same_v<decltype(subslices), uint32_t>) { /* test failed */ }
}

2.8. Intel GPU Number of Execution Units per Subslice

if (dev.has(aspect::ext_intel_gpu_eu_count_per_subslice)) {
    auto euCount = dev.get_info<ext::intel::info::device::gpu_eu_count_per_subslice>();
    if (!std::is_same_v<decltype(euCount), uint32_t>) { /* test failed */ }
}

2.9. Intel GPU Number of hardware threads per EU

if (dev.has(aspect::ext_intel_gpu_hw_threads_per_eu)) {
    auto threadsCount = dev.get_info<ext::intel::info::device::gpu_hw_threads_per_eu>();
    if (!std::is_same_v<decltype(threadsCount), uint32_t>) { /* test failed */ }
}

2.10. Maximum Memory Bandwidth

if (dev.has(aspect::ext_intel_max_mem_bandwidth)) {
    auto maxBW = dev.get_info<ext::intel::info::device::max_mem_bandwidth>();
    if (!std::is_same_v<decltype(maxBW), uint64_t>) { /* test failed */ }
}

2.11. Free Global Memory

if (dev.has(aspect::ext_intel_free_memory)) {
    auto FreeMemory = dev.get_info<ext::intel::info::device::free_memory>();
    if (!std::is_same_v<decltype(FreeMemory), uint64_t>) { /* test failed */ }
}

2.12. Memory Clock Rate

if (dev.has(aspect::ext_intel_memory_clock_rate)) {
    auto MemoryClockRate = dev.get_info<ext::intel::info::device::memory_clock_rate>();
    if (!std::is_same_v<decltype(MemoryClockRate), uint32_t>) { /* test failed */ }
}

2.13. Memory Bus Width

if (dev.has(aspect::ext_intel_memory_bus_width)) {
    auto MemoryBusWidth = dev.get_info<ext::intel::info::device::memory_bus_width>();
    if (!std::is_same_v<decltype(MemoryBusWidth), uint32_t>) { /* test failed */ }
}

These tests will verify that ext::intel::info::device and aspect namespaces has these information descriptors.