Repository navigation
chore(ci): add a Windows build job and run the runtime-dir host tests - #2652
Merged
Merged
Conversation
Five tests/ suites drive bash scripts or make and fail on a Windows host. Their bash-driven classes now carry unittest.skipIf(sys.platform == "win32"); the pure-Python classes in the same files still run there, and the Linux python-tooling job still runs all of them. Two more failures were encoding bugs, not missing tools: test_bench_serving_concurrency read metrics.rs and test_makefile_dev_test_stack read the Makefile with the locale code page, and insert_apache_header.py printed emoji that a cp1252 or cp949 console cannot encode, so its --check crashed instead of passing. The reads now name UTF-8 and the script prints through a helper that replaces unencodable characters. python -m unittest discover -s tests -p 'test_*.py' passes on Windows 11 (188 tests, 76 skipped). Refs #2642
Nothing in CI ran on Windows, and the host tests of the overlays' runtime-directory choice (rocm_runtime_dir_test.sh, and since #2651 cuda_runtime_dir_test.sh) ran only from a developer's make verify. overlay-host-tests runs make verify-rocm-overlay verify-cuda-runtime-dir on ubuntu-latest: the ROCm overlay record checks plus both host tests. The record checks read only the checkout and a synthetic history they build, so a shallow clone is enough. It gates on the rocm filter or the new windows_build filter (build scripts, build_support, the overlays' delayload.cpp, runtime_dir.h and jit_module.cpp for ROCm and CUDA, the bundle packagers and their tests), or ci:full. windows-build runs on windows-latest, gated on windows_build or ci:full and never on a self-hosted pool: the mlxcel-mlx-pin lib tests (adds the cfg(windows) test), the tests/ Python suites, and cargo check -p mlxcel-core --features rocm against the ROCm 10.1.0 gfx1151 TheRock tarball, then asserts the HIP kernel archive exists. The tarball is pinned by sha256 (AMD publishes none), cached per version, family and digest, saved right after verification, and verified again after restore. Measured on a scratch branch: 14.5 min per run on a cache hit, 12 min of it the cargo check; the cache entry is 1.6 GB. The CUDA variant is not added. docs/installation.md replaces "no Windows CI job" with what the job covers; CONTRIBUTING.md and docs/mlxcelverse/rocm-overlay.md name the new jobs. Refs #2642
Swaps the HIP_PATH and runtime-bundle branches of choose_rocm_include_dir() so the new overlay-host-tests job must fail on this push. The next commit reverts it. Refs #2642
Both host test scripts now say that overlay-host-tests runs them on PRs that can change the directory choice, besides their make targets. Touching them also puts the scripts in this PR's diff, so the path-gated overlay-host-tests and windows-build jobs run on the final tree here and on the merge commit on main (the repository has no ci:full label to force them). Refs #2642
The PR runs took 14 and 20 minutes against the 14.5 measured on the scratch branch (the cargo check alone varied from 12 to 17.5 minutes), so the job comment and CONTRIBUTING.md state the range instead of one figure. Refs #2642
5 of 6 tasks
overlay-host-tests ran `make verify-rocm-overlay verify-cuda-runtime-dir` only when the rocm or windows_build filters matched, and neither filter covers rocm_overlay.py, rocm_overlay_test.sh, allocator_ownership_test.{sh,cpp} or the Makefile targets. An edit to those could merge without the job running. The job takes about 16 seconds on a hosted runner and needs no Rust toolchain, so it now runs unconditionally, like python-tooling, which also covers edits to its own definition and every push to main.
windows_build now includes src/lib/mlxcelverse/CMakeLists.txt: a pin bump changes the MLX and HIP sources the Windows rocm check compiles, and rocm-build is parked, so without it a pin bump that breaks the Windows build would merge green and fail the next unrelated PR.
Validated locally: both host tests with ROCm clang++ and the tests/ suites pass. actionlint runs in workflow-lint.
Refs #2642
Member
Author
Implementation Review SummaryIntent
Findings Addressed
Remaining Items
Verification
|
Member
Author
|
Security and performance review of the two new jobs ( Checked and clean:
LOW, left as is:
|
The windows-build docs say the job also runs when a PR carries ci:full, but the repository defines no such label, so only the path filter starts the job today. State that in CONTRIBUTING.md and the CI row of docs/installation.md. Neither file is in the windows_build filter, so this push does not start the Windows job. Refs #2642
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
overlay-host-tests(ubuntu-latest, about 20 s) runsmake verify-rocm-overlay verify-cuda-runtime-dir: the ROCm overlay record checks and the host tests of both overlays' runtime and include directory choice (feat(windows): load the ROCm runtime from a relocatable directory and ship a runtime bundle #2606/feat(windows): load the ROCm runtime from a relocatable directory #2607, feat: Run Windows CUDA builds from a relocatable runtime bundle #2640). The record checks read only the checkout and a synthetic git history they build, so the whole target passes on a shallow clone. It runs unconditionally, likepython-tooling, because several files it runs (rocm_overlay.py,allocator_ownership_test.*, the Makefile targets) are in no path filter.windows-build(windows-latest, compile-only, no GPU) runs themlxcel-mlx-pinlib tests (adds the#[cfg(windows)]test), thetests/Python suites, andcargo check -p mlxcel-core --features rocmagainst the ROCm 10.1.0gfx1151TheRock tarball, then assertsmlx_rocm_kernels.libexists so a skipped HIP build cannot pass. Hosted runners only. It is gated on a newwindows_buildfilter:build.rs,src/lib/mlxcel-core/build.rsandbuild_support/**,src/lib/mlxcel-mlx-pin/**, the ROCm and CUDA overlays'delayload.cpp/runtime_dir.h/jit_module.cpp, the MLX pin (src/lib/mlxcelverse/CMakeLists.txt), both runtime-dir test scripts,scripts/package_windows_*.pyand their Python tests, andtests/test_rocm_arch_validation.py. The tarball is pinned by sha256 (AMD publishes no checksum), cached per version, family and digest, saved right after verification, and verified again after every restore.win32; their pure-Python classes still run there. Two other Windows failures were encoding bugs (locale-code-page reads, emoji prints ininsert_apache_header.pycrashing on cp1252/cp949 consoles) and are fixed instead of skipped.docs/installation.mdreplaces "no Windows CI job" with what the job covers;CONTRIBUTING.mdanddocs/mlxcelverse/rocm-overlay.mdname the new jobs.Windows ROCm check: measured, full check kept
Measured on windows-latest (4 vCPU, image windows-2025-vs2026), first on a scratch branch before opening this PR (run 40403292712; the cache-miss download and save timings come from run 40402876890), then on this PR:
gfx1151, 10.1.0)gh cache list)cargo check12-17.5 minCARGO_TARGET_DIRafter the checkAll within the bounds set for this issue (under 45 min on a hit, under 4 GB of cache, one download per key), so the full
rocmcheck runs rather than a subset. The CUDA variant is not added: it is optional in the issue and was not measured. Repository cache usage was already about 10.5 GB before this entry, so GitHub's LRU eviction applies across all of them.Test plan
python -m unittest discover -s tests -p 'test_*.py'(188 tests, 76 skipped),cargo test -p mlxcel-mlx-pin --lib(49 passed), both host tests with ROCm'sclang++, actionlint 1.7.7 clean onci.yml.choose_rocm_include_dir()): run 40406365843 failsoverlay runtime-dir host testswithFAIL: include: bundle beats HIP_PATHand one more check (job). Reverted in 9ab81fc.overlay runtime-dir host tests(21 s) andWindows build (compile-only)(19 min 50 s, cache hit). The squash commit touches gated paths, sowindows-buildalso runs onmainafter merge, which creates themain-scoped cache entry later PRs restore.Changes during review
overlay-host-testsbecame unconditional; it was gated on filters that missed several of the files it tests.windows_buildfilter, so a pin bump that breaks the Windows build fails on its own PR.ci:fulllabel referenced byci.ymlis not defined in the repository yet. Until a maintainer creates it, a PR that edits only thewindows-builddefinition (for example a tarball digest bump) cannot run that job before merge.Closes #2642