Skip to content

Commit 155a0aa

Browse files
authored
[SYCL][Doc] Add new device descriptors to sycl_ext_intel_device_info extension (#17386)
1 parent e4a826b commit 155a0aa

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

sycl/doc/extensions/supported/sycl_ext_intel_device_info.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The Feature Test Macro SYCL\_EXT\_INTEL\_DEVICE\_INFO will be defined as one of
1919
| 4 | Free device memory query is supported |
2020
| 5 | Device ID is supported |
2121
| 6 | Memory clock rate and bus width queries are supported |
22+
| 7 | Throttle reasons, fan speed and power limits queries are supported |
2223

2324

2425

@@ -489,6 +490,144 @@ Then the memory bus width can be obtained using the standard get\_info() interfa
489490
auto MemoryBusWidth = dev.get_info<ext::intel::info::device::memory_bus_width>();
490491
}
491492

493+
# Throttle reason #
494+
495+
A new device descriptor is added which provides the current clock throttle reasons.
496+
A new enum is added with the list of possible throttle reasons.
497+
498+
## Version ##
499+
500+
The extension supports this query in version 7 and later.
501+
502+
## Throttle reasons ##
503+
504+
| Reason | Description |
505+
| ------------------ | ----------- |
506+
| `power_cap` | The clock frequency is throttled due to hitting the power limit. |
507+
| `current_limit` | The clock frequency is throttled due to hitting the current limit. |
508+
| `thermal_limit` | The clock frequency is throttled due to hitting the thermal limit. |
509+
| `psu_alert` | The clock frequency is throttled due to power supply assertion. |
510+
| `sw_range` | The clock frequency is throttled due to software supplied frequency range. |
511+
| `hw_range` | The clock frequency is throttled because there is a sub block that has a lower frequency when it receives clocks. |
512+
| `other` | The clock frequency is throttled due to other reason. |
513+
514+
515+
```
516+
namespace sycl::ext::intel {
517+
518+
enum class throttle_reason {
519+
power_cap,
520+
current_limit,
521+
thermal_limit,
522+
psu_alert,
523+
sw_range,
524+
hw_range,
525+
other
526+
}
527+
528+
}
529+
```
530+
531+
## Device Information Descriptors ##
532+
533+
| Device Descriptors | Return Type | Description |
534+
| ------------------ | ----------- | ----------- |
535+
| `ext::intel::info::device::current_clock_throttle_reasons` | `std::vector<ext::intel::throttle_reason>` | Returns the set of throttle reasons describing why the frequency is being limited by the hardware. Returns empty set if frequency is not throttled. |
536+
537+
538+
## Aspects ##
539+
540+
A new aspect, `ext_intel_current_clock_throttle_reasons`, is added.
541+
542+
543+
## Error Condition ##
544+
545+
Throws a synchronous `exception` with the `errc::feature_not_supported` error code if the device does not have `aspect::ext_intel_current_clock_throttle_reasons`.
546+
547+
## Example Usage ##
548+
549+
Then the current clock throttle reasons can be obtained using the standard `get_info()` interface.
550+
551+
```
552+
if (dev.has(aspect::ext_intel_current_clock_throttle_reasons)) {
553+
std::vector<ext::inte::info::throttle_reason> Reasons = dev.get_info<ext::intel::info::device::current_clock_throttle_reasons<>();
554+
}
555+
```
556+
557+
558+
# Fan speed #
559+
560+
A new device descriptor is added which provides the fan speed for the device.
561+
562+
## Version ##
563+
564+
The extension supports this query in version 7 and later.
565+
566+
## Device Information Descriptors ##
567+
568+
| Device Descriptors | Return Type | Description |
569+
| ------------------ | ----------- | ----------- |
570+
| `ext::intel::info::device::fan_speed` | `int32_t` | Returns the current speed of device's fan (as a percentage of the maximum speed of the fan). If fan speed can't be measured then returns -1. If there are multiple fans, then returns maximum value. |
571+
572+
573+
## Aspects ##
574+
575+
A new aspect, `ext_intel_fan_speed`, is added.
576+
577+
578+
## Error Condition ##
579+
580+
Throws a synchronous `exception` with the `errc::feature_not_supported` error code if the device does not have `aspect::ext_intel_fan_speed`.
581+
582+
## Example Usage ##
583+
584+
Then the fan speed can be obtained using the standard `get_info()` interface.
585+
586+
```
587+
if (dev.has(aspect::ext_intel_fan_speed)) {
588+
auto FanSpeed = dev.get_info<ext::intel::info::device::fan_speed>();
589+
}
590+
```
591+
592+
# Power limits #
593+
594+
New device descriptors are added which provide the maximum and minimum power limits for the device.
595+
596+
## Version ##
597+
598+
The extension supports this query in version 7 and later.
599+
600+
## Device Information Descriptors ##
601+
602+
| Device Descriptors | Return Type | Description |
603+
| ------------------ | ----------- | ----------- |
604+
|`ext::intel::info::device::min_power_limit` |`int32_t` | Returns the minimum power limit of the device in milliwatts. Returns -1 if the limit is not known. |
605+
|`ext::intel::info::device::max_power_limit` |`int32_t` | Returns the maximum power limit of the device in milliwatts. Returns -1 if the limit is not known. |
606+
607+
608+
## Aspects ##
609+
610+
A new aspect, `ext_intel_power_limits`, is added.
611+
612+
613+
## Error Condition ##
614+
615+
Throws a synchronous `exception` with the `errc::feature_not_supported` error code if the device does not have `aspect::ext_intel_power_limits`.
616+
617+
## Example Usage ##
618+
619+
Then the power limits can be obtained using the standard `get_info()` interface.
620+
621+
```
622+
if (dev.has(aspect::ext_intel_power_limits)) {
623+
auto Min = dev.get_info<ext::intel::info::device::min_power_limit>();
624+
auto Max = dev.get_info<ext::intel::info::device::max_power_limit>();
625+
}
626+
```
627+
628+
629+
630+
492631
# Deprecated queries #
493632

494633
The table below lists deprecated, that would soon be removed and their replacements:

0 commit comments

Comments
 (0)