Repository navigation
Closed
Labels
area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:enhancementNew features, capabilities, or significant additions
Description
Summary
[profile.release] in Cargo.toml is tuned for shipping binaries (fat lto = true, codegen-units = 1, opt-level = 3, strip = true). All local and agent test iteration currently runs through this profile because target/debug is usually cold (the MLX C++ tree rebuild makes the debug profile expensive to warm). Add a dedicated fast profile for test/dev iteration.
Motivation (measured)
Measured facts from the 2026-07-17 implementation chain:
- The main crate is a single ~390k-line crate, so any source edit recompiles the whole crate on one core (
codegen-units = 1blocks parallel codegen), followed by a fat-LTO link across ~439 locked crates. Measured at 4 to 6 minutes per incremental rebuild. - A typical issue cycle (developer edit-test iterations plus review-stage fixes) pays 5 to 8 such rebuilds, i.e. 25 to 45 minutes of pure compile time per small issue.
- All-targets test runs multiply the LTO link per test binary.
Implementation plan
- Add
[profile.test-fast]to Cargo.toml:inherits = "release"lto = "thin"(orfalseif thin-LTO still dominates link time; measure both)codegen-units = 16strip = falseincremental = true- keep
opt-level = 3(MLX-heavy tests need optimized numerics for tolerable runtimes; drop to 2 only if measurements show parity)
- Add a Makefile target
test-fast(and optionallycheck-fast) wrappingcargo test --profile test-fast --features cuda, with a narrow-filter example in the help text. - Document in the contributor/build docs which profile to use for iteration vs shipping.
- Parity check: run a representative narrow test set (e.g.
models::minimax_m3,server::chat_request, mlxcel-core sampling andcache::ring) under both profiles and confirm identical pass/fail results; record the measured rebuild-time comparison (cold and incremental) in the PR body.
Acceptance criteria
-
[profile.test-fast]exists in Cargo.toml and builds with--features cuda - Makefile
test-fasttarget exists and runs tests under the new profile - Contributor/build docs updated to state which profile to use for iteration vs shipping
- Parity spot-check recorded: representative narrow test set produces identical pass/fail results under both profiles
- Measured incremental rebuild speedup reported in the PR (expect roughly 3 to 5x)
Note: repository CI currently runs no test job, so this is purely a local/agent iteration improvement with no CI changes required.
Metadata
Metadata
Assignees
Labels
area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:enhancementNew features, capabilities, or significant additions
Activity
build: add a fast test profile to cut edit-test iteration (#812)
fix(ci): run the Metal test gate single threaded, like the CUDA one (#…
build: add a fast test profile to cut edit-test iteration (lablup#812)
fix(ci): run the Metal test gate single threaded, like the CUDA one (l…