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

Open
opened 2026-11-25 23:01:41 +00:00 by mokkamokacaffe · 1 comment
mokkamokacaffe commented 2026-11-25 23:01:41 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by mokkamokacaffe on 2026-11-25T23:01:41Z.


Current status

The two steps in the contribution plan have open implementations. PR #2870 verifies artifact bundles and reports 35 passing Python tests. The stacked AMD adapter in #2871 reports 43 passing Python tests and a successful offline RGA 2.15.0.30 run for gfx1101 using a minimal DXC-built compute shader. The Windows workspace run reported failures. Analysis of an XCL-emitted shader and NVIDIA capture remain open.

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.

<!-- greyfinch-sync:ivall/xcl:issue:6615517807 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2562). Originally posted by [mokkamokacaffe](https://github.com/mokkamokacaffe) on 2026-11-25T23:01:41Z. --- ## Current status The two steps in the [contribution plan](https://github.com/xcl-dev/xcl/issues/2562#issuecomment-7202131065) have open implementations. PR #2870 verifies artifact bundles and reports 35 passing Python tests. The stacked AMD adapter in #2871 reports 43 passing Python tests and a successful offline RGA 2.15.0.30 run for `gfx1101` using a minimal DXC-built compute shader. The Windows workspace run reported failures. Analysis of an XCL-emitted shader and NVIDIA capture remain open. # 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.
IISKII1 commented 2026-11-26 19:56:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by IISKII1 on 2026-11-26T19:56:46Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7202131065 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2562#issuecomment-7202131065). Originally posted by [IISKII1](https://github.com/IISKII1) on 2026-11-26T19:56:46Z. --- 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#2552
No description provided.