Skip to content

[CUDA] Pass MLX_CUDA_ARCH_LIST as a single quoted macro - #4839

Merged
zcbenz merged 1 commit into
ml-explore:mainfrom
dhiltgen:cuda-arch-list
Nov 6, 2026
Merged

zcbenz merged 1 commit into
ml-explore:mainfrom
dhiltgen:cuda-arch-list

Conversation

@dhiltgen

@dhiltgen dhiltgen commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Follow up to #4761 - fix up the cmake wiring to keep MSVC with the VS generator happy.

  • ☑️ I understand it is strictly prohibited to use AI to write PR description
  • AI usage disclosure: co-developed with coding agent

@zcbenz
zcbenz merged commit fc344c9 into ml-explore:main Nov 6, 2026
24 checks passed
@dhiltgen
dhiltgen deleted the cuda-arch-list branch November 6, 2026 20:00
inureyes added a commit to lablup/mlxcel that referenced this pull request Nov 16, 2026
Advance the MLX pin from `9f806b36` to `fc344c98`, the head of upstream `main` on 2026-11-16 and one commit newer. Nothing else has merged upstream since the last bump (#2876). See `docs/mlxcelverse/mlx-pin-2026-11-16.md`.

The new commit, ml-explore/mlx#4839, passes `MLX_CUDA_ARCH_LIST` to the compiler as one quoted macro and splits it at runtime, so MSVC with the Visual Studio generator accepts a multi-architecture CUDA list. It changes only `mlx/backend/cuda/CMakeLists.txt` and `mlx/backend/cuda/device_info.cpp`. mlxcel sets `MLX_CUDA_ARCHITECTURES` from `build.rs` and never reads the macro or `get_arch_list()`, so no mlxcel code changes.

## Overlays

- None of the 175 overlay files is one of the two changed upstream files, so every CPU, Metal, CUDA and core overlay applies unchanged and keeps the base it was last merged from.
- ROCm: `rocm_overlay.py retarget` moved the core files to the new pin with no conflicts, and `drift` reports the same residual as before. Only the `UPSTREAM` pin line and the `CORE_RESIDUAL.diff` header change. The fork stays `75915908`.

## Validation (Apple M3 Ultra)

- Pin parsers: `cargo test -p mlxcel-mlx-pin` (52 + 1 passed), `scripts/ci/mlx_pinned_commit_test.sh` passed, and the CMake file resolves to `fc344c98`.
- `make verify-rocm-overlay` and `rocm_overlay.py drift` pass.
- Release build with `metal,accelerate` fetched and compiled MLX at `fc344c98`; the binary reports that commit.
- Metal, serial: `layers::tests` 47, `sdpa`/`attention` 146, `qmm`/`qmv` 28, mlxcel-core `qmm`/`qmv`/`cpu_qmm_accum`/`mamba1_scan`/`nemotron_registry` 27, `models::{jamba,mamba,ssd_scan,nemotron_h}` 92, all passed.
- Greedy generation with `gemma-3n-e2b-it-4bit` and `qwen3.5-4b-4bit` runs and is coherent.
- fmt and env-var docs check pass.

PR CI passed, including the Windows compile-only build, the CUDA architecture-list check and the MLX pin extraction. No CUDA compile ran (on this host or in PR CI), and the only functional change is in the CUDA build, so the next GB10 build is its first compile.
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.

2 participants