Repository navigation
Description
Diagnostics: run vendor shader analyzers against reproducible XCL artifacts
Summary
Add an opt-in post-processing command that consumes the shader artifacts and manifest from #2553, detects the active adapter vendor, and invokes a configured vendor analyzer when available.
The first targets are AMD Radeon GPU Analyzer and NVIDIA Nsight tooling. Analyzer absence or an unsupported shader must be reported as SKIPPED, while XCL's common validation and correctness tests retain their normal result.
Part of #1269 and follows #2541.
Motivation
DXIL validation establishes that a supported validator accepts a container. It does not explain long driver compilation, high VGPR or SGPR pressure, low occupancy, a vendor-specific compiler failure or a GPU crash. XCL now has a path toward stable guest-code and emitted-DXIL identities in #2553. Vendor reports should attach to those identities so results from different machines can be compared.
Proposed interface
xcl shaders <pack> --direct --hash HASH --dump out
scripts/analyze-shader.ps1 -Manifest out\...manifest.jsonTool locations should be explicit or discovered from documented installations:
XCL_RGA=<path to rga.exe>
XCL_NSIGHT=<path to supported Nsight command or Python environment>
Ordinary test and runtime paths must not download an analyzer. A dedicated CI or contributor setup may install a pinned version before invoking the adapter.
Common report fields
- XCL commit and manifest schema version
- guest-code and emitted-DXIL hashes
- shader stage, wave mode and translation backend
- adapter vendor, device ID and driver version
- analyzer name, version and complete command line
- exit status and normalized diagnostic category
- generated ISA size where reported
- register use and occupancy where reported
- analyzer wall time
- paths of local raw outputs
AMD path
Use Radeon GPU Analyzer where its DX12 offline mode supports the emitted container and target GPU. Preserve the raw report and extract stable fields such as ISA size, VGPRs, SGPRs and occupancy.
NVIDIA path
Prototype an external Nsight Python controller for a capture or analysis run. Detect an installed supported version and record it. Keep the controller outside XCL's runtime process. Any NVIDIA SDK redistribution or automated installation must follow its license and documented installation flow.
Test behavior
- Run the common XCL translation and validation checks on every adapter.
- Recompute and verify the artifact hashes before invoking an analyzer.
- Select the matching vendor adapter.
- Return
SKIPPEDwhen the tool is absent or the mode is unsupported. - Preserve analyzer failures as additional diagnostics without rewriting the common correctness result.
- Disclose analyzer overhead and do not compare its timings with an ordinary run.
Success criteria
- Two machines analyzing the same manifest can establish that they received identical DXIL.
- AMD reports include stable compiler resource statistics when RGA supports the shader.
- NVIDIA reports record a reproducible Nsight invocation and capture path.
- Tool absence leaves the base test green and produces a clear skip reason.
- No proprietary tool is silently downloaded by XCL or an ordinary test run.
AI use
OpenAI Codex reviewed the proposed XCL diagnostic artifact flow and drafted this vendor-analyzer integration plan.
Activity
IISKII1 commentedon Nov 26, 2026
I plan to contribute this in two reviewable steps, building on #2553: first an offline command that verifies the dump manifest/artifact hashes and records reproducible analyzer diagnostics; then an opt-in AMD Radeon GPU Analyzer adapter with explicit tool/target selection, bounded execution and preserved raw output. Missing tools or unsupported inputs will be reported as skipped, without changing common validation results; no automatic downloads. NVIDIA capture integration is outside this first contribution.
AI assistance: Codex (GPT-6), for implementation, tests and this plan. Actual analyzer coverage and limitations will be reported separately from synthetic tests.