mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3127] [Feature]: an AMD card as an expert helper beside an NVIDIA card (CUDA engine + HIP helper process, Linux, opt-in) #1254
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#1254
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 @alizand1992 on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3127
What do you want to do?
Use an NVIDIA card and an AMD card in the same PC together, without Vulkan. #1214 asked for this (closed as not planned, since a Vulkan backend would be a separate engine), and the later comments there ask for exactly NVIDIA + AMD. I have a working prototype that keeps the existing backends and asks whether you want it, and in what shape, before I open any pull request.
How it works. The CUDA engine stays the primary. With
--external-experts <path to strata-expert-helper>it starts a second process, built from the HIP backend, that loads the hottest experts the NVIDIA card does not hold into the AMD card's VRAM. Per layer, the engine writes the routed tokens for those experts into a shared memory block(a memfd that bothcudaHostRegisterandhipHostRegisteraccept, so neither side copies). The helper computes them with the existing HIP expert kernels and writes the rows back. The CPU pool computes whatever neither GPU holds, as it does today. With--external-experts-ram exclusive, the RAM copy leaves out the helper's experts, so on 32 GB the remaining experts fit in RAM.Measured on one box: Ryzen 9 3900X (AVX-2 only), 32 GB DDR4, RTX 5060 Ti 16 GB on CPU lanes (engine), RX 9060 XT 16 GB on the chipset's x4 Gen3 link (helper), Ubuntu, engine 0.1.41. Five fixed prompts (4K and 32K code, two short chats, one tool call), greedy, one fresh server and one pass each, 64K context,
--spec 4 --mtp, int8 K/V.--resident-experts--resident-experts--external-experts, a 4K prompt gave identical tokens in two runs of the build before the change and two runs of the branch. The short prompts differ run to run on the base build too, so they cannot show it either way.IQ3_S at full context (256K): the setup I run every day. Flash-Next IQ3_S has 46.84 GiB of experts. At 256K the int8 K/V cache leaves room for only 5.40 GiB of them in the RTX's cache. With the helper, 15.36 GiB sit on the RX 9060 XT and 22.38 GiB in RAM, so about 3.7 GiB come from the SSD. On the RTX alone, the same RAM would hold about 23 of the remaining 41.44 GiB, so about 18 GiB would come from the SSD. That last figure is arithmetic from the startup lines, not a measured run: my RTX-only IQ3_S attempt ran the PC so low on memory that it was stopped in its first request, so there is no RTX-only IQ3_S speed here.
Same prompts and settings as above, helper exclusive,
--resident-experts:mainat477ac13c)Size. About 1,780 lines of engine code: mostly new files (
include/strata/xhelper/protocol.hpp,src/core/external_experts.cpp,src/xhelper/helper_main.cpp,src/xhelper/helper_tier.cpp), and about 230 lines in existing files (expert_source.cpp/.hpp,generate.cpp,CMakeLists.txt). Plus tests: a protocol test that runs in both builds without a GPU, a helper parity test against the CPU kernels, and an engine-side test with a real helper.Limits.
--layer-split,--expert-cache-device1..3,--remote-expert-opt,--peer-device,--batch,--pipeline-windows 2,--vram-elasticand--kv-grow.How it was made. Both the code and the plan were written with Claude Code Opus 5.5. I ran every
measurement above on my own hardware. I have not yet reviewed the code line by line myself, and unlikely to do so since I am not proficient in CPP. I just compiled and have been using it as my daily driver.
Questions.
--expert-cache-device1,--remote-expert-opt) do the same job for a second card of the same vendor. Would you rather this reuse that path, with the helper process as one more kind of remote tier, than add a separate--external-expertsflag?The branch is at https://github.com/alizand1992/Strata (
main). The plan, the per-phase results and the raw numbers are indocs/plans/OPTION_A_EXCLUSIVE_RAM.mdanddocs/plans/results/.@markd89 commented on GitHub (Oct 19, 2026):
Nice idea!
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.