Skip to content

feat(windows): load the ROCm runtime from a relocatable directory - #2607

Merged
inureyes merged 7 commits into
mainfrom
feature/issue-2606-relocatable-rocm-runtime
Oct 26, 2026
Merged

inureyes merged 7 commits into
mainfrom
feature/issue-2606-relocatable-rocm-runtime

Conversation

@inureyes

@inureyes inureyes commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The Windows ROCm delay-load hook loads every ROCm DLL from one runtime directory, chosen once: MLXCEL_ROCM_RUNTIME_DIR (absolute; when set it is the only candidate, and a relative path or a folder without the HIP runtime is a clear error), else the executable's directory when it holds the HIP runtime named in the image's delay-import table, else the baked SDK bin. The choice is printed as [mlx-rocm] ROCm runtime: <dir> (<source>). The selection is a pure header-only function (runtime_dir.h).
  • Before any ROCm DLL loads, the chosen directory must hold an amd_comgr*.dll and a hiprtc-builtins*.dll, which the HIP runtime and hiprtc load by plain name. A missing file, or a DLL missing from the chosen directory, fails with the expected path and never falls back to another ROCm installation (including the display driver's System32 copies).
  • The hiprtc JIT takes headers from <runtime dir>\include or <runtime dir>\..\include after ROCM_HOME/ROCM_PATH/HIP_PATH and before the baked SDK include.
  • scripts/package_windows_rocm_runtime.py builds mlxcel-rocm-runtime-<ver>-win-x64.zip (gfx1151, ROCm 10.1.0: 359 files, 225 MiB, 76 MiB zipped) or stages a tree; --add-binary makes a full app folder.
  • Docs: runtime resolution, bundle build and layout, install rules (no shared folder with llama.cpp's runtime, admin-only folders, path length, HIP_PATH set by the HIP SDK installer overrides the bundle headers), MLXCEL_ROCM_RUNTIME_DIR. LOCAL_FIXES.md item 58.

Deviations from the issue, found while testing

  • The bundle keeps the SDK layout (bin\, .kpack\, include\) instead of being flat: rocBLAS, hipBLASLt and rocFFT load device code from <dll dir>\..\.kpack\<lib>_<arch>.kpack. The binaries go in the bundle's bin\, or MLXCEL_ROCM_RUNTIME_DIR names that bin\.
  • libopenblas.dll is an eager import of both binaries and must sit beside them.
  • A 133-character runtime directory crashed the first bf16 GEMM (long paths off); the hook warns above 130 characters.
  • The tarball has no license file for the HIP runtime, hipRTC or rocm_kpack.

Changes during review

  • A bundle without amd_comgr.dll silently loaded the driver's System32\amd_comgr.dll next to the bundle's HIP runtime, fell back to CPU and crashed with 0xC0000409. The comgr/hiprtc-builtins presence check above fixes it.
  • Hook messages printed paths with %ls, which the MSVC CRT truncates at the first non-ASCII character; paths are now printed as UTF-8, and directory listing no longer throws on unconvertible names.
  • --rocm-version is validated like .info/version (a ../ value could write outside --out).

Verification (gfx1151, ROCm 10.1.0, final build at eb1c47a; SDK renamed away, PATH=System32 only, no ROCm env vars, cold JIT cache, cwd holding decoy ROCm DLLs)

Check Result
Bundle staged by the script, exe in its bin\: generate 1.7B-bf16 "Paris"; all 10 ROCm modules from the bundle bin\
Same, server: chat, stream, /v1/messages all "Paris", stream ends with [DONE]
MLXCEL_ROCM_RUNTIME_DIR naming the bundle "Paris", 70 tok/s
Bundle without amd_comgr.dll / hiprtc-builtins*.dll / rocblas.dll exits 0xC06D007E naming the missing file and directory; nothing from System32
Runtime directory through a Korean-named junction path printed intact; cold JIT generate "Paris"; missing-folder error prints the full path
No bundle, SDK renamed; developer build with SDK present error names both candidates; dev build uses C:\rocm\10.1.0\bin
cargo test -p mlxcel-mlx-pin --lib (49), fmt, clippy --features rocm -D warnings, overlay drift/records, check_env_var_docs.py, host C++ test, tests/test_package_windows_rocm_runtime.py (18) pass

Informational: llama.cpp b11889's ROCm 10.0 amdhip64_7.dll, amd_comgr.dll and rocm_kpack.dll plus the 10.1 math libraries ran both models correctly through MLXCEL_ROCM_RUNTIME_DIR; one host only, so the docs still forbid mixing.

Not verified: other drivers and GPUs, Windows long-path mode, FFT (hipFFT/rocFFT are shipped but no FFT ran). The host C++ test is not run by CI.

Closes #2606

A Windows rocm build could only run on a machine with the same ROCm SDK at the path recorded at build time. The delay-load hook now picks one runtime directory per process: MLXCEL_ROCM_RUNTIME_DIR (absolute, authoritative, no fallback when wrong), else the executable's directory when it holds the HIP runtime named in the image's delay-import table, else the baked SDK bin. Every ROCm DLL and preload comes from that directory only, a missing DLL fails with its expected path, and the choice is printed once. The pure selection lives in the new header-only runtime_dir.h.

The hiprtc JIT takes headers from the include folder in or beside the runtime directory before the baked SDK include.

scripts/package_windows_rocm_runtime.py builds the runtime bundle (ten DLLs, arch-filtered rocBLAS and hipBLASLt kernels, .kpack archives, include/hip, licenses) in the SDK layout, because rocBLAS, hipBLASLt and rocFFT open ../.kpack relative to their DLL. A runtime path over 130 characters crashed a bf16 GEMM under MAX_PATH, so the hook warns about it.

Validated on gfx1151 with the SDK renamed away: generate and all three server endpoints from the bundle bin and through MLXCEL_ROCM_RUNTIME_DIR, module origins, decoys and the missing-DLL failure. Host tests cover both selection functions and the packaging script.

Closes #2606
@inureyes inureyes added status:review Under review type:enhancement New features, capabilities, or significant additions priority:medium Medium priority area:core mlxcel-core: MLX FFI, primitives, KV cache, layers platform:windows Windows (native) specific labels Oct 26, 2026
…me dir

A runtime directory without amd_comgr.dll was accepted: the preload loaded nothing, the HIP runtime's plain-name LoadLibrary resolved to the display driver's System32 amd_comgr.dll (confirmed from the loaded-module list), HIP reported no device, mlxcel fell back to the CPU and then crashed with 0xC0000409 and no message. That is the cross-version pairing the one-directory rule exists to prevent.

The delay-load hook now lists the chosen directory before loading any ROCm DLL and requires at least one amd_comgr*.dll and one hiprtc-builtins*.dll (missing_runtime_preloads() in runtime_dir.h, covered by the host test). A missing pattern, or a preload Windows refuses, stops the binary with a message naming the directory and the pattern. Directory entries are read as UTF-8 so a non-ANSI file name cannot throw inside the hook. Docs and LOCAL_FIXES item 58 describe the check.

Verified on gfx1151 with ROCm 10.1.0: a bundle without amd_comgr.dll (exe directory and MLXCEL_ROCM_RUNTIME_DIR) and one without hiprtc-builtins0716.dll exit 0xC06D007E with that message and load no ROCm DLL; the complete bundle generates "Paris" with every ROCm DLL from its bin; the developer build still uses the SDK bin. Host test, Python tests, mlxcel-mlx-pin tests, fmt, clippy --features rocm, overlay drift/records and check_env_var_docs.py pass.

Refs #2606
@inureyes

Copy link
Copy Markdown
Member Author

Implementation Review Summary

Intent

Load every Windows ROCm DLL from one relocatable runtime directory (override, exe directory, baked SDK), let the JIT use that directory's headers, ship a bundle script, and document it, without ever mixing two ROCm installations.

Findings Addressed

  • A runtime directory without amd_comgr*.dll was accepted: the preload loaded nothing, amdhip64's plain-name load took the driver's System32\amd_comgr.dll (seen in the module list), HIP found no device, mlxcel ran on the CPU and crashed with 0xC0000409 and no message. The hook now requires amd_comgr*.dll and hiprtc-builtins*.dll in the chosen directory before loading any ROCm DLL and stops with a message naming the directory and pattern; a refused preload is also an error. Pure check in runtime_dir.h with host tests; docs and LOCAL_FIXES 58 updated. (HIGH, f293423)

Remaining Items

None at CRITICAL/HIGH. The rest of the PR (selection order, no fallback after a bad override, JIT include order, bundle script, docs including the llama.cpp folder rule) matches the issue and its comment.

Verification

  • All stated requirements implemented
  • No placeholder/mock code remaining
  • Integrated into project code flow
  • Project conventions followed
  • Existing modules reused where applicable
  • No unintended structural changes
  • Tests pass

Rebuilt --features rocm (gfx1151, ROCm 10.1.0). Bundle missing amd_comgr.dll (exe directory and MLXCEL_ROCM_RUNTIME_DIR) or hiprtc-builtins0716.dll: exits 0xC06D007E with the new message, no ROCm DLL loaded. Complete bundle: 1.7B-bf16 cold JIT and 0.6B-4bit answer "Paris", all ten ROCm DLLs from the bundle bin. Developer build uses C:\rocm\10.1.0\bin. Host C++ test, 15 Python tests, 49 mlxcel-mlx-pin tests, fmt, clippy --features rocm, overlay drift/records and check_env_var_docs.py pass. The server was not re-run after this change.

--rocm-version went into the zip file name and the top folder of every entry without the check applied to .info/version, so a value such as ../../x wrote the zip outside --out and produced entries with .. components. It is now held to the same pattern, which also must start with a letter or digit, so ".." is rejected.

Also: duplicate destination detection uses a Counter instead of a quadratic list scan, and --stage-dir naming an existing file fails with a packaging error instead of an uncaught NotADirectoryError. Unit tests cover the three cases.

Refs #2606
The hook printed directories with printf %ls. The MSVC CRT converts %ls through the default C locale, which stops at the first non-ASCII character and returns -1, so a runtime directory under a non-ASCII user name (for example C:\Users\<Korean name>\Downloads\mlxcel\bin) printed a cut-off "[mlx-rocm] ROCm runtime:" line and error messages that lost the path and the advice after it. A probe built with the same toolchain printed "C:\Users\" and nothing more.

Paths are now converted with WideCharToMultiByte(CP_UTF8) and printed with %s. The same non-throwing conversion replaces path::u8string() for the directory listing in the hook, so a file name that is not valid UTF-16 cannot throw inside the delay-load helper. The JIT's runtime include lookup catches a failed conversion and skips the candidate.

Refs #2606
@inureyes

Copy link
Copy Markdown
Member Author

Security and performance review

No CRITICAL or HIGH findings. DLL search order holds: every ROCm DLL and both plain-name preloads come from the one chosen directory, loaded by full path with LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS. CWD and PATH are never searched, a missing file raises the helper's exception without trying another candidate, and the exe-directory candidate adds nothing beyond the application directory Windows already trusts for implicit imports.

Fixed:

  • MEDIUM (eb1c47a): the hook printed paths with %ls. The MSVC CRT cuts that off at the first non-ASCII character in the default C locale, so a runtime directory under a non-ASCII user name lost the path and the rest of every message (shown with a probe built by the same toolchain). Paths are now converted with WideCharToMultiByte and printed with %s.
  • LOW (eb1c47a): u8string() can throw for names that are not valid UTF-16, inside the delay-load hook (directory listing) and in the JIT include lookup. The hook now uses the non-throwing conversion, and the JIT skips the candidate.
  • LOW (7b0465c): --rocm-version skipped the check .info/version gets, so ../../x wrote the zip outside --out and gave entries .. components. Also: linear duplicate check, and a clean error when --stage-dir is a file.

Not changed (spec order): ROCM_HOME/ROCM_PATH/HIP_PATH come before the bundle's own headers. The AMD HIP SDK installer sets HIP_PATH system-wide, so on such a machine a bundle JIT-compiles against that SDK's headers. Worth a follow-up or a docs note.

Verification: package script unit tests (18), rocm_runtime_dir_test.sh, overlay drift/records, check_env_var_docs.py pass. Both overlay files compiled in the real CMake build. The final link did not run because the session hit low memory (link.exe exit 0xC0000142), so the rebuilt binaries are not runtime-tested yet.

ROCM_HOME, ROCM_PATH and HIP_PATH take precedence over the bundle's include folder for the JIT headers. The AMD HIP SDK installer sets HIP_PATH system-wide, so on such a machine the kernel compiler would use the SDK's headers, possibly from a different ROCm version than the bundle's runtime. Document clearing HIP_PATH for mlxcel, or pointing it at the bundle root, in the Windows ROCm install rules and in the environment variable reference.

Validation:
- python3 scripts/ci/check_env_var_docs.py: OK
- cargo fmt --all --check, clippy -p mlxcel-core --release --features rocm -- -D warnings: clean
- rocm_runtime_dir_test.sh (with the SDK clang++), tests.test_package_windows_rocm_runtime (18 tests), overlay drift and records: pass

Refs #2606
@inureyes inureyes added status:done Completed and removed status:review Under review labels Oct 26, 2026
Both scripts start with a shebang, and test_script_executable_modes requires Python entry points to carry executable Git mode; the python tooling tests job failed on scripts/package_windows_rocm_runtime.py. The host test script gets the same mode as rocm_overlay_test.sh.

Refs #2606
@inureyes
inureyes merged commit afdd588 into main Oct 26, 2026
29 checks passed
@inureyes
inureyes deleted the feature/issue-2606-relocatable-rocm-runtime branch October 26, 2026 03:11
inureyes added a commit that referenced this pull request Oct 26, 2026
…#2651)

## Summary

Windows `--features cuda` binaries now load every CUDA, cuDNN and NVRTC DLL from one runtime directory and can run from a relocatable bundle, following the ROCm design of #2606/#2607. No NVIDIA GPU was available, so this PR is verified by building and by GPU-less runtime checks only (see below); runs on an NVIDIA host are still open.

- `overlays/cuda/.../runtime_dir.h` (new, header-only, host-tested): `choose_cuda_runtime_dir()` picks `MLXCEL_CUDA_RUNTIME_DIR` (absolute, must hold the runtime, no fallback), else the executable directory when it holds the CUDA runtime DLL named in the binary's own delay-import table, else the build-time layout. nvcc links the static cudart, so the marker is `cublasLt64_13.dll`.
- `delayload.cpp`: in a bundle, the DLLs the libraries open by plain name (`nvrtc64_*`, `nvrtc-builtins*`, `cublas64_*`, `cublasLt64_*`, `nvJitLink_*`, seven required `cudnn_*` sub-libraries; `cusparse64_*` checked only) are checked before any CUDA DLL loads and preloaded by full path; a failed load raises the delay-load exception naming the expected path instead of returning null. The build-time path keeps upstream's per-library lookup and its fallback; it only adds the `[mlx-cuda] CUDA runtime:` line, plus a message naming the missing marker path when a bundle-looking exe directory lacks it.
- `jit_module.cpp`: NVRTC headers, CCCL and CUTLASS come from the bundle's `include\` (in or beside the runtime directory), ranked after `CUDA_HOME` and ahead of `CUDA_PATH`.
- `scripts/package_windows_cuda_runtime.py`: stages or zips `bin\` (DLLs + OpenBLAS), `include\` (JIT headers, CCCL from the build's `_deps`, CUTLASS), `licenses\` (CUDA EULA, cuDNN, CCCL, CUTLASS); fails naming every missing DLL, header or license. Licenses are told apart by content, because the redistributable archives all ship a `LICENSE` that overwrites the others when unpacked into one directory.
- `make verify-cuda-runtime-dir` (in `make verify`), docs in `installation.md` and `environment-variables.md`, overlay README record.

## Decisions and open points

- The DLL closure is derived statically (import tables and embedded DLL names of the x64 CUDA 13.4.3 / cuDNN 9.27 DLLs), not from a loaded-module list of a generate run; to be confirmed on hardware.
- The JIT header set was found by compiling each of the 17 headers MLX embeds for the JIT with NVRTC 13.4 against only the staged bundle's `include\` (needs no GPU). That added `cuda_runtime.h`, `mma.h` and `crt/mma.h(pp)`, which CUTLASS includes. Several of these headers (`cooperative_groups.h`, `math_constants.h`, `cuda_runtime.h`, `mma.h`, ...) are not on the CUDA EULA Attachment A list; the docs say so and advise confirming terms with NVIDIA before publishing a bundle. Prebuilt archives stay out of scope.
- `delayload.cpp` is 595 lines, over the 500-line guideline; it is an overlay of an upstream file (like `jit_module.cpp` at 805), so it was not split.

## Changes during review

- `CUDA_HOME` now really outranks the bundle's headers: the bundle `include\` was placed ahead of the chosen CUDA header dir on the NVRTC include list, so NVRTC took every CUDA header from the bundle even with `CUDA_HOME` set. With `CUDA_HOME` set the bundle include now goes last and only supplies CUTLASS/CuTe (implementation review, HIGH).
- `cusparse64_*`, which only cuSOLVER imports, is checked before any CUDA DLL loads, so a missing cuSPARSE is reported under its own name instead of as cuSOLVER (implementation review).
- `MLXCEL_CUDA_RUNTIME_DIR` is normalized (`.`/`..`, trailing separator) before use; `C:\b\bin\` previously made the header lookup miss the bundle's `include\` and fall back to `CUDA_PATH` (security review).
- The baked-mode cuDNN log line no longer converts through the ANSI code page unguarded inside the delay-load hook (security review).
- Documented, not fixed: the CUDA libraries also open `nvcuda.dll`, `nvcudart_hybrid64.dll`, `zlibwapi.dll`, `cask_profile_interface.dll`, `nvtileiras64.dll` and the two optional cuDNN sub-libraries by plain name; the bundle neither ships nor checks them, so the standard search order (application directory, System32, then current directory and `PATH`) applies, as it does in developer builds. Closing that needs a decision and is left to the DLL-planting follow-up (#2641).
- On Linux the only behavior difference is that an empty `CUDA_HOME` now counts as unset.

## Test plan

Toolkit: NVIDIA redistributables for windows-x86_64, CUDA 13.4.3 (cudart/nvcc/crt/nvrtc/nvjitlink/nvvm 13.4.92, cccl 13.3.4.3.1, cublas 13.8.0.4, cufft 12.4.0.43, cusolver 12.3.5.3, cusparse 12.8.6.72) and cuDNN 9.27.0.42 for CUDA 13, sha256-checked. Host: Windows 11 x64, Radeon 8060S, no NVIDIA GPU.

- [x] x64 `cargo build --release --features cuda` (`MLX_CUDA_ARCHITECTURES=120`): cold build 32 min, rebuilt after the review fixes (17 min 37 s, `mlxcel.exe` 133,756,928 bytes) with the harness re-run, no build-glue change needed; `mlxcel.exe` 128 MiB, `mlxcel-server.exe` 118 MiB. `llvm-readobj --coff-imports`: cuBLASLt, cuFFT, cuSOLVER, cuDNN and NVRTC are DelayImport, no CUDA DLL in the regular import table.
- [x] `cargo clippy --release --features cuda -- -D warnings` (x64), `cargo fmt --all --check`, `cargo test -p mlxcel-mlx-pin --lib` (49 passed).
- [x] `make verify-cuda-runtime-dir` host test (clang++), checked to fail on mutated selection logic; 25 unit tests in `tests/test_package_windows_cuda_runtime.py`; env-var docs check; license header check.
- [x] Packaging on the real archives: 1830 files, 1968 MiB; fails naming the file when one is renamed, and refuses cuDNN's `LICENSE` as the CUDA EULA.
- [x] Hook exercised with no GPU: a harness linking this `delayload.cpp` unchanged calls `cublasLtGetVersion`, `nvrtcVersion`, `cufftGetVersion` and `cudnnGetVersion` through delay-loaded DLLs. With the toolkit renamed away and `CUDA_PATH` unset, every CUDA/cuDNN/NVRTC module loads from the bundle (exe directory and `MLXCEL_CUDA_RUNTIME_DIR`), `nvcuda.dll` from System32; relative and wrong-folder overrides, a removed delay-loaded DLL, a removed `cudnn_ops` and a removed marker each fail with the expected path. With the toolkit present the harness loads from the toolkit as before.
- [x] `mlxcel generate` and `mlxcel-server` from the bundle (toolkit hidden) and the developer build both stop with 0xC0000409 at the first device query after `Detected 1 GPU(s).`, before any delay-loaded CUDA DLL is requested (this host has a stale `nvcuda.dll` but no NVIDIA GPU). Everything after device initialization is unverified.
- [ ] On a Windows NVIDIA host (RTX Spark N1X or x64): generate (including the first NVRTC JIT) and the server from a fresh bundle folder with the toolkit moved away; module list; removed-DLL failure; developer build unchanged.

Closes #2640
inureyes added a commit that referenced this pull request Oct 26, 2026
…#2652)

## Summary

- `overlay-host-tests` (ubuntu-latest, about 20 s) runs `make verify-rocm-overlay verify-cuda-runtime-dir`: the ROCm overlay record checks and the host tests of both overlays' runtime and include directory choice (#2606/#2607, #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, like `python-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 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 `mlx_rocm_kernels.lib` exists so a skipped HIP build cannot pass. Hosted runners only. It is gated on a new `windows_build` filter: `build.rs`, `src/lib/mlxcel-core/build.rs` and `build_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_*.py` and their Python tests, and `tests/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.
- The bash-driven classes of the five suites named in the issue skip on `win32`; their pure-Python classes still run there. Two other Windows failures were encoding bugs (locale-code-page reads, emoji prints in `insert_apache_header.py` crashing on cp1252/cp949 consoles) and are fixed instead of skipped.
- `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.

## 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](https://github.com/lablup/mlxcel/actions/runs/40403292712); the cache-miss download and save timings come from [run 40402876890](https://github.com/lablup/mlxcel/actions/runs/40402876890)), then on this PR:

| | |
|---|---|
| TheRock tarball (`gfx1151`, 10.1.0) | 1,649,447,497 bytes |
| Cache entry (`gh cache list`) | 1,625,900,605 bytes |
| Job, cache hit | 14.5 min (scratch), about 20 min three times on this PR ([PR run](https://github.com/lablup/mlxcel/actions/runs/40408890440/job/121873850081)); restore 22-24 s, verify 5-7 s, extract 54-57 s, `cargo check` 12-17.5 min |
| Job, cache miss | 14 min ([PR run](https://github.com/lablup/mlxcel/actions/runs/40406365843/job/121865140156)); download 4-6 s, save 10-11 s |
| Extracted SDK after excludes | 3.8 GB of 8.4 GB |
| `CARGO_TARGET_DIR` after the check | 2.2 GB, HIP kernel archive 190.1 MiB |

All 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 `rocm` check 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

- [x] Windows 11 host: `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's `clang++`, actionlint 1.7.7 clean on `ci.yml`.
- [x] Deliberately broken order (78f4552 swaps the HIP_PATH and bundle branches of `choose_rocm_include_dir()`): [run 40406365843](https://github.com/lablup/mlxcel/actions/runs/40406365843) fails `overlay runtime-dir host tests` with `FAIL: include: bundle beats HIP_PATH` and one more check ([job](https://github.com/lablup/mlxcel/actions/runs/40406365843/job/121865140004)). Reverted in 9ab81fc.
- [x] Final tree: [run 40415050086](https://github.com/lablup/mlxcel/actions/runs/40415050086) passes `overlay runtime-dir host tests` (21 s) and `Windows build (compile-only)` (19 min 50 s, cache hit). The squash commit touches gated paths, so `windows-build` also runs on `main` after merge, which creates the `main`-scoped cache entry later PRs restore.

## Changes during review

- `overlay-host-tests` became unconditional; it was gated on filters that missed several of the files it tests.
- The MLX pin joined the `windows_build` filter, so a pin bump that breaks the Windows build fails on its own PR.
- The docs say the `ci:full` label referenced by `ci.yml` is not defined in the repository yet. Until a maintainer creates it, a PR that edits only the `windows-build` definition (for example a tarball digest bump) cannot run that job before merge.

Closes #2642
@inureyes inureyes added this to the 0.8 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core mlxcel-core: MLX FFI, primitives, KV cache, layers platform:windows Windows (native) specific priority:medium Medium priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(windows): load the ROCm runtime from a relocatable directory and ship a runtime bundle

1 participant