mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4883] [Other] Setup: --gpus on Windows AMD: RDNA 2, 3 and 4 cards sharing one model #5230
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#5230
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4883
Author: @lwYeo
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:feature/windows-amd-multi-gpu📝 Commits (1)
7a96644Setup: --gpus on Windows AMD - RDNA 2, 3 and 4 cards sharing one model📊 Changes
8 files changed (+303 additions, -41 deletions)
View changed files
📝
docs/AMD_HIP.md(+11 -2)📝
docs/MULTI_GPU.md(+2 -1)📝
docs/TROUBLESHOOTING.md(+12 -0)📝
setup.py(+129 -35)📝
strata_control/dsv41_fit.py(+1 -1)📝
tools/strata_bench.py(+46 -0)📝
tools/test_setup_amd.py(+94 -0)📝
tools/test_setup_start_gpus_amd.py(+8 -2)📄 Description
[Other] Setup: --gpus on Windows AMD: RDNA 2, 3 and 4 cards sharing one model
Problem and result
On Windows,
setup.pyrefused--gpusoutright: "several AMD cards sharing one model (--gpus) is Linux-only for now". The engine itself runs multi-GPU on Windows (HIP), so a PC with, say, an RX 6800 XT (RDNA 2) and an AI PRO R9700 (RDNA 4) could not split a model across its cards through setup.After:
--gpus(and--gpus all) is accepted for AMD on Windows. Setup names the cards in the HIP order the engine uses, a re-run keeps an installed model's card pair, the engine step renumbers the split as the HIP runtime numbers it (an iGPU taking HIP 0 no longer breaks a saved"0,2"), and the engine acquisition checks every architecture in the split, not just the main card's. Verified end to end: a 16 GB RDNA 2 + 32 GB RDNA 4 split serves a 50 GB-quant model in low-RAM mode on Windows.Related discussion
none — this is a focused setup fix, not a scope-agreement feature.
Approach
The Linux-only refusal predates the Windows HIP engine; nothing in the engine path is Linux-specific. The parts that needed work:
strata-device --list-devicesand renumbers, so the saved config matches what the engine sees.HIP_VISIBLE_DEVICESis cleared for that probe so a leftover env var (Ollama, LM Studio) cannot compact the view.rdna2,rdna3,rx9070). A cross-family split (gfx1030 + gfx1201) is in no single package, so the keep/zip/feed paths now check all archs in the split, and the feed result is checked before it is installed — a one-family package can never become the installed engine of a cross-family split. A split the feed cannot serve names the missing family and points attools/hip/build_windows.bat(one fat build covers RDNA 2, 3 and 4).--prebuiltis no longer vetoed in the card check by the installed engine's "not an architecture" verdict — that engine is what the run is about to replace. Othercannot runverdicts still stop.start_gpus(start an installed model with--gpus) takes the AMD card list on Windows instead of falling into the NVIDIA list, where--gpus allanswered "this PC does not have two GPUs".tools/strata_bench.pylabels runs by HIP numbering (hip_ordinal), so bench rows match the config.Compatibility: the default path (one card,
--gpu) is untouched; NVIDIA and Linux paths untouched; DeepSeek's Windows one-card rule keeps its own reason (per-card packages), no longer cites the removed Linux-only rule. New behaviour is opt-in via--gpuson Windows AMD.Validation
Branch
feature/windows-amd-multi-gpu@7a966442on main146df3c4. Environment: Windows 11, Gigabyte X870E, AMD RX 6800 XT (gfx1030, 16 GB) + AI PRO R9700 (gfx1201, 32 GB), Ryzen 7 7700X, 48 GB RAM.Passed:
python setup.py --check --gpus 1,0and--check --gpus all(no GPU work): step 1 accepts the pair — "GPU 1 (AMD Radeon AI PRO R9700, 32 GB) + GPU 0 (AMD Radeon RX 6800 XT, 16 GB) together (the model's layers are split across them)".START-HERE.bat --backend hip --prebuilt dist --gpus 1,0on this PC: setup completed, engine started, model (Swift 1.5 IQ3_S, 262K context, 8-bit KV, images on, low-RAM mode ~57% of experts on the two GPUs) serving on port 11436.tools/hip/build_windows.bat→dist/strata-windows-x64-hip.zip(753 MiB, engine 0.1.58 built from this base, archs gfx1030/31, gfx1100/01/02, gfx1151, gfx1200/01; GPU vision reader for all of them). Installed and run on the gfx1030 + gfx1201 pair — hardware execution, not just compilation; the live instance now serves the Unsloth UD IQ4_XS pack with the split active ("layer split: layers 0-14 (CUDA0), 15-47 (CUDA1)").python -m pytest tools/test_setup_amd.py→ 57 passed (includes new tests: split across families accepted/rejected by arch, feed checked before install, probe ignoresHIP_VISIBLE_DEVICES, permissive--gpusparse on Windows).python -m pytest tools/test_setup_start_gpus_amd.py→ 5 passed (includes the new Windows--gpus allcase).tools/test_setup_amd_cards.py,test_setup_cards_029.py,test_setup_choices.py,test_setup_dsv41.py,test_setup_gpu_fit.py,test_setup_configs.py,test_setup_config.py,test_setup_rerun_size.py,test_setup_menu.py,test_setup_hybrid.py,test_setup_feed_engine.py,test_setup_engine_keep.py→ all passed, no GPU.Failed:
tools/test_setup_dsv41.py→ 1 failed (test_the_pci_ids_name_the_card_when_kfd_and_rocminfo_say_nothing) andtools/test_setup_menu.py→ 1 failed (test_tail_skip_stays_on_for_linux_gfx12) in the 12-suite sweep. Both reproduce identically on plain main146df3c4without this change; not touched by this PR.Not run:
tests/terminalsuite (the Terminal code paths are untouched; the run in this environment hit missing test dependencies and did not complete).--gpus(no Linux environment here) — the Linux code path is not modified.Limits
tools/hip/build_windows.bat, one build covers all three RDNA generations): the signed feed publishes one family per package, so no feed package can serve e.g. RDNA 2 + RDNA 4. Setup says this by name when it happens.--prebuiltinstall is unverified by SHA-256 (existing behaviour for local prebuilts; setup prints the notice).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.