#5972 [Other] add opt-in Rust strata-fit crate for VRAM and multi-GPU fit math
open · @stuchapin909 · 0 comentarios · En GitHub
Descripción
## Problem `strata_control/vram_fit.py` and `strata_control/gpu_fit.py` hold pure deterministic VRAM and multi-GPU fit arithmetic that is duplicated in native tooling. Providing an opt-in `std`-only Rust crate (`crates/strata-fit`) gives a single zero-dependency source of truth with exact parity and pure-Python fallback when unbuilt. ## Changes - Added `crates/strata-fit` (`std`-only, zero `unsafe`, JSON CLI for `vram-plan`, `gpu-fit`, and `gpu-options`, using Python-compatible round-half-to-even). - Wired `strata_control/vram_fit.py` (`plan`) and `strata_control/gpu_fit.py` (`fit`, `options`) to call `crates/strata-fit/target/release/strata-fit(.exe)` (or `STRATA_FIT_BIN`) when present, falling back to pure Python otherwise. ## Validation - **Passed:** - `cargo test` in `crates/strata-fit`: 3 passed, 0 failed. - `cargo clippy --all-targets -- -D warnings`: 0 warnings. - `python -m unittest tests/terminal/test_vram_fit.py tests/terminal/test_gpu_fit.py tests/terminal/test_gpu_plan_main.py tests/terminal/test_gpu_roles.py tests/terminal/test_own_path_fit.py`: 98 passed, 0 failed. - **Failed:** None. - **Not run:** Linux/macOS builds and full `tests/terminal` suite outside the 5 fit test files above.
En el sitio
Enlaces a install, modelos, releases.