|
| 1 | +# SYCL(TM) Proposal: New device descriptors for Intel GPUs |
| 2 | + |
| 3 | +**IMPORTANT**: This specification is a draft. |
| 4 | + |
| 5 | +**NOTE**: Khronos(R) is a registered trademark and SYCL(TM) is a trademark of the Khronos Group, Inc. |
| 6 | + |
| 7 | +An internal team at Intel has requested a new device descriptors to provide access to low-level hardware details about Intel GPU devices. This information will be useful to developers tuning specifically for those devices. |
| 8 | + |
| 9 | +This proposal details what is required to provide this information as a SYCL extensions. |
| 10 | + |
| 11 | +## Feature Test Macro ## |
| 12 | + |
| 13 | +The same Feature Test Macro will be used for the new device descriptor support. It will be defined as: |
| 14 | + |
| 15 | + #define SYCL_EXT_INTEL_GPU_DEVICE_INFO 1 |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +# Intel GPU PCI Address # |
| 20 | + |
| 21 | +A new device descriptor will be added which will provide the PCI address of an Intel GPU in BDF format. BDF format contains the address as: `domain:bus:device.function`. |
| 22 | + |
| 23 | +This support can only be provided when using the Level Zero backend \(BE\). This is the default for Intel GPUs. The OpenCL BE does not provide the PCI address at this time. |
| 24 | + |
| 25 | + |
| 26 | +## Device Information Descriptors ## |
| 27 | + |
| 28 | +| Device Descriptors | Return Type | Description | |
| 29 | +| ------------------ | ----------- | ----------- | |
| 30 | +| info\:\:device\:\:ext\_intel\_gpu\_pci\_address | std\:\:string | For Level Zero BE, returns the PCI address in BDF format: `domain:bus:device.function`.| |
| 31 | + |
| 32 | + |
| 33 | +## Aspects ## |
| 34 | + |
| 35 | +A new aspect, ext\_intel\_gpu\_pci\_address, will be added. |
| 36 | + |
| 37 | +## Error Condition ## |
| 38 | + |
| 39 | +The function device\:\:get_info\(\) will return an empty string if the device does not support aspect\:\:ext\_intel\_gpu\_pci\_address. |
| 40 | + |
| 41 | + |
| 42 | +## Example Usage ## |
| 43 | + |
| 44 | +The PCI address can be obtained using the standard get\_info() interface. |
| 45 | + |
| 46 | + if (dev.has(aspect::ext_intel_gpu_pci_address) { |
| 47 | + auto BDF = dev.get_info<info::device::ext_intel_gpu_pci_address>(); |
| 48 | + } |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +# Intel GPU Execution Unit SIMD Width # |
| 53 | + |
| 54 | +A new device descriptor will be added which will provide the physical SIMD width of an execution unit on an Intel GPU. This data will be used to calculate the computational capabilities of the device. |
| 55 | + |
| 56 | +This support will only be provided when using the Level Zero backend \(BE\). This is the default for Intel GPUs. The OpenCL BE does not provide the physical SIMD width at this time. |
| 57 | + |
| 58 | +## Device Information Descriptors ## |
| 59 | + |
| 60 | +| Device Descriptors | Return Type | Description | |
| 61 | +| ------------------ | ----------- | ----------- | |
| 62 | +| info\:\:device\:\:ext\_intel\_gpu\_eu\_simd\_width | uint32\_t| Returns the physical SIMD width of the execution unit (EU).| |
| 63 | + |
| 64 | + |
| 65 | +## Aspects ## |
| 66 | + |
| 67 | +A new aspect, ext\_intel\_gpu\_eu\_simd\_width, will be added. |
| 68 | + |
| 69 | + |
| 70 | +## Error Condition ## |
| 71 | + |
| 72 | +The function device\:\:get_info\(\) will return PI\_INVALID\_VALUE if the device does not support aspect\:\:ext\_intel\_gpu\_eu\_simd\_width. |
| 73 | + |
| 74 | +## Example Usage ## |
| 75 | + |
| 76 | +The physical EU SIMD width can be obtained using the standard get\_info() interface. |
| 77 | + |
| 78 | + if (dev.has(aspect::ext_intel_gpu_eu_simd_width) { |
| 79 | + auto euSimdWidth = dev.get_info<info::device::ext_intel_gpu_eu_simd_width>(); |
| 80 | + } |
| 81 | + |
| 82 | + |
| 83 | +# Intel GPU Execution Unit Count # |
| 84 | + |
| 85 | +A new device descriptor will be added which will provide the number of execution units on an Intel GPU. If the device is a subdevice, then the number of EUs in the subdevice is returned. |
| 86 | + |
| 87 | +This new device descriptor will provide the same information as "max\_compute\_units" does today. We would like to have an API which is specific for Intel GPUs. |
| 88 | + |
| 89 | +This support will only be provided when using the Level Zero backend \(BE\). This is the default for Intel GPUs. |
| 90 | + |
| 91 | +## Device Information Descriptors ## |
| 92 | + |
| 93 | +| Device Descriptors | Return Type | Description | |
| 94 | +| ------------------ | ----------- | ----------- | |
| 95 | +| info\:\:device\:\:ext\_intel\_gpu\__eu\_count | uint32\_t| Returns the number of execution units (EUs) associated with the Intel GPU.| |
| 96 | + |
| 97 | + |
| 98 | +## Aspects ## |
| 99 | + |
| 100 | +A new aspect, ext\_intel\_gpu\_eu\_count, will be added. |
| 101 | + |
| 102 | + |
| 103 | +## Error Condition ## |
| 104 | + |
| 105 | +The function device\:\:get_info\(\) will return PI\_INVALID\_VALUE if the device does not support aspect\:\:ext\_intel\_gpu\_eu\_count. |
| 106 | + |
| 107 | +## Example Usage ## |
| 108 | + |
| 109 | +Then the number of EUs can be obtained using the standard get\_info() interface. |
| 110 | + |
| 111 | + if (dev.has(aspect::ext_intel_gpu_eu_count) { |
| 112 | + auto euCount = dev.get_info<info::device::ext_intel_gpu_eu_count>(); |
| 113 | + } |
0 commit comments