Diagnostics: run vendor shader analyzers against reproducible XCL artifacts #2562

Open
opened 2026-11-26 05:33:49 +00:00 by github-bot · 0 comments
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-25 23:01 UTC · original

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.json

Tool 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

  1. Run the common XCL translation and validation checks on every adapter.
  2. Recompute and verify the artifact hashes before invoking an analyzer.
  3. Select the matching vendor adapter.
  4. Return SKIPPED when the tool is absent or the mode is unsupported.
  5. Preserve analyzer failures as additional diagnostics without rewriting the common correctness result.
  6. 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.

**@⁠mokkamokacaffe** on GitHub · 2026-11-25 23:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/2562) # 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 ```powershell xcl shaders <pack> --direct --hash HASH --dump out scripts/analyze-shader.ps1 -Manifest out\...manifest.json ``` Tool locations should be explicit or discovered from documented installations: ```text 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 1. Run the common XCL translation and validation checks on every adapter. 2. Recompute and verify the artifact hashes before invoking an analyzer. 3. Select the matching vendor adapter. 4. Return `SKIPPED` when the tool is absent or the mode is unsupported. 5. Preserve analyzer failures as additional diagnostics without rewriting the common correctness result. 6. 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:33:49 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.