Skip to content

Scripts: analyze verified compute dumps with AMD RGA - #2871

Draft
IISKII1 wants to merge 6 commits into
xcl-dev:mainfrom
IISKII1:codex/amd-shader-analysis
Draft

IISKII1 wants to merge 6 commits into
xcl-dev:mainfrom
IISKII1:codex/amd-shader-analysis

Conversation

@IISKII1

@IISKII1 IISKII1 commented Nov 26, 2026

Copy link
Copy Markdown

Stacked on #2870 (which follows #2553); only the top commit belongs here. Part of #2562.

Add opt-in AMD RGA offline compute analysis to the verified bundle command. Preserve raw logs, argv, tool version, exit code, wall time and CSV statistics. Missing tools/unsupported stages skip; failed or timed-out analysis is an error. A zero exit without nonempty ISA is not success.

What is in it

  • scripts/shader_rga.py, CLI options, eight tests and README usage. Explicit offline target; no runtime changes or automatic downloads.

Tested

  • Windows 10 Pro build 19045, Radeon RX 7700 XT driver 32.0.22021.1009, Rust 1.94.0 MSVC, Python 3.13, DXC 1.8.2502.11; debug.
  • python -B -m unittest discover -s scripts -p test_*.py: 43 passed, 0 failed, including real subprocess exit/log and timeout tests. The other analyzer tests use synthetic responses.
  • Real RGA 2.15.0.30 with a minimal DXC-built cs_6_0 demonstration shader, embedded root signature, target gfx1101: analysis_complete; ISA and CSV generated, ISA_SIZE 268, USED_VGPRs 3, USED_SGPRs 17. This fixture is not an XCL translation or game shader, and these are offline compiler statistics, not GPU measurements.
  • Invocation: python -B scripts/analyze_shader.py sample.manifest.json --out reports --rga <official-rga.exe> --target gfx1101 --timeout 60.
  • scripts/test.ps1 built successfully but stopped at library tests: 1297 passed, 3 failed, 26 ignored, 345 explicit GPU skips included in passes. Failures: passthrough_mesh_stream_accepts_a_triangle_driver_blob, split_compute_program_prebuilds_and_caches_chain_pieces, stale_blob_cannot_bypass_the_offline_pipeline_cap (no SM 6.6). Integration tests did not run. Rust sources unchanged from the dependency.
  • git diff --check passed.

Not tested

  • Real XCL-produced DXIL through RGA, retail title, graphics stages, NVIDIA, host-adapter discovery, unsupported offline targets and other RGA releases. No GPU execution coverage for skipped tests. Occupancy is not inferred. Draft pending dependencies, a translated-shader check and full Windows validation.

AI use

  • Codex (GPT-6) implemented and reviewed the code, ran tests and the official AMD tool, and drafted the description.

mokkamokacaffe and others added 6 commits November 25, 2026 23:43
Check the guest hash and the result selected by the manifest. Compare exact diagnostic bytes for rejected translations so saved artifacts can be verified without the source pack or a GPU.

Assisted-by: OpenAI Codex (GPT-6)
Remove an existing manifest before replacing any of its sibling artifacts. A failed rerun can then leave incomplete files, but cannot make the verifier accept the previous generation as the new result.

Add a two-generation regression that forces the replacement error artifact to be unwritable and checks that the old manifest is gone.

Assisted-by: OpenAI Codex (GPT-6.2 Astra Ultra)
Snapshot and verify analyzer inputs before external tools consume them. Record source metadata and SHA-256 identities separately from diagnostic results.

Assisted-by: Codex (GPT-6)
Run explicitly selected offline compute analysis with isolated outputs, bounded subprocess execution and raw CSV statistics. Keep analyzer outcomes separate from XCL correctness results.

Assisted-by: Codex (GPT-6)
rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
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.

3 participants