mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #128] --gpus with mixed architectures fails: engine not rebuilt when adding a GPU with a different compute capability #65
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pdsmike on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/128
Bug
When starting Strata with --gpus that includes a GPU whose compute capability differs from what the engine was originally built for, the engine is not recompiled. It crashes with a CUDA error on the first kernel launch on the unsupported card.
Reproduction
./setup.sh --gpus 0,1,2 --calibrateResult: The engine starts, splits layers across all 3 GPUs, then crashes on the first kernel launch on the sm_86 card:
strata generate: layer split across 3 GPUs: CUDA0, then CUDA1,2 (split auto)
...
strata generate: layer split: CUDA1 holds its weights, session; 11.42 GiB free
kv_stream: reset: no kernel image is available for execution on the device
The same happens without --calibrate: any start() path that resolves to a multi-GPU list whose archs are not a subset of the engine's built archs.
Root cause
setup.py → start() (line ~1192) and the --calibrate shortcut (line ~1338) never verify that the installed engine binary was compiled for all GPU architectures in the --gpus list. The engine_runs_on() helper exists (line 365) but is only called from offer_together() (line 420), not from the --gpus/start() path.
The build-time logic in build_engine() (line 865) correctly unions archs from gpu["archs"], but that function is only reached during the full --setup flow (step 1 → step 3), not when starting an already-installed model with a different GPU set.
Expected behaviour
When start() (or the calibrate path) resolves to a GPU list whose architectures are not all covered by the engine's BUILD.json "archs" field, it should recompile the engine for the full arch set (reusing build_engine()) before launching, or at minimum warn and refuse to start.
Suggested fix
In start(), after the GPU list is resolved (after line ~1217), add:
This reuses the existing build_engine() which handles the BUILD.json stamp, source-hash check, and all bookkeeping. The same guard should be added to the --calibrate shortcut at line 1348 (before start() is called) or, better, placed inside start() itself so both paths are covered.
Environment
model Log
Console log
Assisted with Qwen3.8 27b
@Niko1221 commented on GitHub (Sep 29, 2026):
Thanks @pdsmike, confirmed on 0.1.26: setup never checks that the installed engine has code for every card in
--gpus, and even--setupskips the rebuild when the source hasn't changed. We'll make both paths recompile for all the chosen cards. Meanwhile, deletingengine/BUILD.jsonand running--setup --gpus 0,1,2forces a compile for all three.@Niko1221 commented on GitHub (Sep 29, 2026):
Fixed in 0.1.27: setup now checks that the engine has code for every card the model runs on, both with
--setup --gpus ...and when starting. If a card is missing, it compiles the engine for all the chosen cards and keeps the generations the engine was built for. A ready-made engine that lacks a card is replaced by a compiled one. Thanks @pdsmike! Please reopen if a mixed set still fails to start.