Skip to content

tests: find LLVM 15 on Windows PATH for the descriptor-store round trip - #2205

Merged
R0Y00 merged 2 commits into
R0Y00:mainfrom
RavenCurseBurg:tests/discover-windows-llvm
Nov 25, 2026
Merged

R0Y00 merged 2 commits into
R0Y00:mainfrom
RavenCurseBurg:tests/discover-windows-llvm

Conversation

@RavenCurseBurg

@RavenCurseBurg RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

While running the formatted-store fixture for #2022, I put the official Windows LLVM 15.0.7 package on PATH outside Program Files. Its clang.exe, llvm-objcopy.exe and LLVM-C.dll were available, but the fixture still printed llvm15_round_trip=skipped. The package supplies clang’s integrated AMDGPU assembler. The fixture looked for that assembler only in the default install directory. LLVM 15.0.7 release

The Windows clang fallback now looks for all three files together in an absolute PATH directory or the default location. It checks the clang major version before selecting the toolchain. A regression control supplies a non-default directory to the detector.

Verification

Current head 56f05c79 includes the upstream MSVC build fix from #2204. I reran the descriptor-store WARP fixture with the Windows LLVM 15 package on PATH. The round trip matched and the wrong-value control failed at word 14 as expected. The upstream Windows build, Linux checks, and gfx1013 assembly checks passed. Upstream CI · Full Windows 2025 Debug and Release run

  • Ran python -B tests/compute_store_check.py draw-descriptor-store-format <dxc> <offscreen_check> warp on Windows with LLVM 15.0.7 on PATH. Base 33a47702 printed llvm15_round_trip=skipped. This branch printed llvm15_round_trip=match. The real fixture assembled for gfx1013, disassembled, lowered identically and passed WARP readback with 1 and 2 groups. Both refusal cases passed. The wrong 32_UINT store produced the expected mismatch at word 14.
  • Repeated the same WARP command with the portable LLVM directory absent from PATH. The optional round trip was skipped and the readbacks passed.
  • Restoring only the base detector made the new regression control fail. An additional local probe exercised an incomplete directory and a simulated clang 19 ahead of the real LLVM 15 package. The detector selected the complete LLVM 15 directory.
  • git diff --check passed.

AI-assisted with Codex (GPT-6.2 Astra xhigh, as specified by the contributor).

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of head c59738d (tests/compute_store_check.py only).

Findings: 0 P1, 0 P2.

  • find_llvm15() now scans PATH plus the Program Files fallback on Windows, requires clang.exe, llvm-objcopy.exe and LLVM-C.dll together, and checks clang --version for major 15 before use. The os.name == "nt" guard keeps Linux behavior unchanged. A failing or missing clang is skipped (OSError / non-zero exit), so the optional round trip stays optional.
  • The new control in descriptor_store_controls() builds a fake complete toolchain in a temp dir, patches PATH and the version probe, and asserts the exact tuple. It only runs on Windows, as the draw mode that calls it does.
  • No competing PR touches this function.

Commands executed locally:

  • python3 tests/docs_links_check.py -> pass (405 links)
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • Control run with the module's os.name forced to nt (Linux): CONTROL_PASS
  • Mutation 1: version regex changed from 15 to 14 -> control fails (AssertionError)
  • Mutation 2: PATH scan removed (only Program Files left) -> control fails (AssertionError)
  • Worktree restored with git checkout -- . after each mutation.

Note: GitHub shows the Windows checks run as action_required (needs maintainer approval), so Build and test on Windows has not run for this head yet.

AI-assisted; commands listed were executed locally.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of head 56f05c7 (tests/compute_store_check.py only).

Result: 0 P1, 0 P2.

What I checked:

  • find_llvm15() now walks PATH (plus the Program Files fallback) on Windows only, requires absolute directories with clang.exe, llvm-objcopy.exe and LLVM-C.dll, and accepts the toolchain only if clang --version reports 15.x. A broken or wrong-version clang is skipped instead of failing the run.
  • The new control in descriptor_store_controls() builds a fake complete toolchain in a temp dir and asserts discovery outside Program Files. It is gated on os.name == "nt", so it only runs where the code under test runs.
  • Overlap: only #1803 (large feature PR, CHANGES_REQUESTED) carries an older copy of find_llvm15; it does not fix the same behavior, so there is no competing fix. It will need a rebase onto this change after merge.

Commands executed locally:

  • git diff --check origin/main...HEAD -> clean
  • python3 tests/docs_links_check.py -> 407 links OK
  • python3 tests/bidi_controls_check.py -> no bidi controls
  • Harness running descriptor_store_controls() with os.name patched to nt -> passes
  • Mutation 1: version regex 15 -> 14 -> new control fails (AssertionError)
  • Mutation 2: PATH-directory branch disabled -> new control fails (AssertionError)
  • Worktree restored with git checkout -- .
  • CI at this head: Linux checks, fixtures, and Build and test on Windows = SUCCESS.

AI-assisted; commands listed were executed locally.

Copy link
Copy Markdown
Contributor Author

The full Windows 2025 Debug run now provides a hosted regression case for this change. On the same ab9a020c base, compute_store_aot_descriptor_store_format_warp selected the system clang and failed with unknown target triple 'amdgcn-unknown-amdpal' on the branch without this detector change. At 56f05c79 the same CTest passed in 10.56 s. The two remaining Debug failures concern temporary-path spelling and PowerShell warning colors in other tests. The portable LLVM 15 binary round trip is recorded separately in the PR description. Before · After

@R0Y00
R0Y00 merged commit d4a1a2c into R0Y00:main Nov 25, 2026
5 checks passed
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