Skip to content

[api-query] Report GPU driver version#1205

Open
alsepkow wants to merge 3 commits into
llvm:mainfrom
alsepkow:api-query-driver-version
Open

[api-query] Report GPU driver version#1205
alsepkow wants to merge 3 commits into
llvm:mainfrom
alsepkow:api-query-driver-version

Conversation

@alsepkow
Copy link
Copy Markdown
Collaborator

@alsepkow alsepkow commented May 19, 2026

The "Dump GPU Info" step in CI runs api-query to log each adapter's API, description, and driver name. Logging the driver version would be useful too when triaging GPU/driver-specific failures, so we have a record of which driver build was in use when a test failed.

Changes:

  • Device base class: Add DriverVersion member and getDriverVersion() getter.
  • D3D12: Read DXCoreAdapterProperty::DriverVersion and decode the packed LARGE_INTEGER into Major.Minor.Build.Revision.
  • Vulkan: Read VkPhysicalDeviceDriverProperties::driverInfo (vendor-specific human-readable build string, e.g. "26.5.2 (AMD proprietary shader compiler)").
  • api-query: Print a new Driver Version: line beneath Driver:.

Sample output:

- API: DirectX
  Description: AMD Radeon RX 6800
  Driver Version: 32.0.21043.10005
- API: Vulkan
  Description: AMD Radeon RX 6800
  Driver Version: 26.5.2 (AMD proprietary shader compiler)

Note: the Driver: line is blank on D3D12 in the sample above — that's a pre-existing gap being addressed separately in #1206. This PR is independent.


Assisted by Copilot.

@alsepkow alsepkow force-pushed the api-query-driver-version branch from fae5f69 to 482e8d1 Compare May 19, 2026 01:43
@alsepkow alsepkow changed the title [api-query] Report GPU driver version, populate DriverName on DX [api-query] Report GPU driver version May 19, 2026
The "Dump GPU Info" CI step runs api-query to log each adapter's API,
description, and driver name. Logging the driver version would be useful
too when triaging GPU/driver-specific failures, so we have a record of
which driver build was in use when a test failed.

- Device base class: Add `DriverVersion` member and `getDriverVersion()`
  getter.
- D3D12: Read `DXCoreAdapterProperty::DriverVersion` and decode the packed
  `LARGE_INTEGER` into `Major.Minor.Build.Revision`.
- Vulkan: Read `VkPhysicalDeviceDriverProperties::driverInfo` (vendor-
  specific human-readable build string, e.g. `26.5.2 (AMD proprietary
  shader compiler)`).
- api-query: Print a new `Driver Version:` line beneath `Driver:`.

Sample output:

- API: DirectX
  Description: AMD Radeon RX 6800
  Driver Version: 32.0.21043.10005
- API: Vulkan
  Description: AMD Radeon RX 6800
  Driver Version: 26.5.2 (AMD proprietary shader compiler)

Assisted by Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alsepkow alsepkow force-pushed the api-query-driver-version branch from 482e8d1 to f4ee6aa Compare May 19, 2026 01:49
@alsepkow alsepkow marked this pull request as ready for review May 19, 2026 01:53
@alsepkow
Copy link
Copy Markdown
Collaborator Author

I realized after that we are saving a dxdiag. That will have the driver version. Still seems convenient to have it logged here IMO though.

Copy link
Copy Markdown
Contributor

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. See my comment in the other PR about how I feel like the current "DriverName" field is confusingly named.

alsepkow and others added 2 commits May 19, 2026 12:12
`lit.cfg.py` runs api-query and parses stdout with `yaml.safe_load`.
`VkPhysicalDeviceDriverProperties::driverInfo` is vendor-specific
freeform text and can contain `:` characters. On Qualcomm Adreno it
returns e.g. `Driver Build: 6d3eabf20f, Iabbb0663b5, 17528 ...`, which
when emitted unquoted produces two `: ` sequences on the same line and
trips the YAML scanner with `mapping values are not allowed here`.

Emit Driver Version as a double-quoted YAML scalar with `"` and `\`
escaped, so colons inside the value are treated as plain text.

Assisted by Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes clang-tidy `misc-const-correctness` warning-as-error in CI on
configurations that run clang-tidy as part of the build.

Assisted by Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants