[GH-ISSUE #1236] Will zero-copy be implemented on Strix Halo? #509

Closed
opened 2026-11-04 01:43:37 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @gmgorag on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1236

Unfortunately, the current Strix Halo implementation mirrors the discrete GPU path: it fully loads expert weights into memory then creates additional expert cache slots, thereby exacerbating the already significant memory pressure. Since Strix Halo allows the GPU to directly access mapped host memory, employing the swap-in/swap-out strategies used for discrete GPUs is unnecessary and even detrimental. Are there plans to implement a proper zero-copy path tailored for unified memory in the future?

Originally created by @gmgorag on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1236 Unfortunately, the current Strix Halo implementation mirrors the discrete GPU path: it fully loads expert weights into memory then creates additional expert cache slots, thereby exacerbating the already significant memory pressure. Since Strix Halo allows the GPU to directly access mapped host memory, employing the swap-in/swap-out strategies used for discrete GPUs is unnecessary and even detrimental. Are there plans to implement a proper zero-copy path tailored for unified memory in the future?
Author
Owner

@huppiflupp commented on GitHub (Oct 6, 2026):

A data point for this, measured on Linux (Ryzen AI Max+ 395, 128 GB, gfx1151, ROCm 7.14.1, Strata 82f46a8, UD-IQ4_XS, --mmap-experts --expert-cache 24576, all 24,576 experts resident).

With the default borrowing, a 16K prompt lends 2,840 cache slots (6.4 GiB) to the prompt path, streams those experts through host staging during the prompt (6.9 GB copied, 7.9 s of host staging time) and refills the slots afterwards (676 ms). On a unified-memory APU none of that is needed: the memory is there to hold every expert and the prompt buffers at the same time.

--no-prefill-borrow already gets most of the way: prompt buffers of their own, 0 experts streamed. In the OpenAI server, three distinct ~15K-token prompts, two interleaved rounds each:

prompt tok/s answer tok/s (de / code, 600 tokens)
default (borrowing) 1,099 38.6 / 59.1
--no-prefill-borrow (plus a Q6_K dense trunk) 1,157 (+5.2 %) 38.4 / 60.8

One caveat: in single CLI runs --no-prefill-borrow left only 24,031 of 24,576 experts resident (the reserve), and the decode after the prompt varied with the page cache. In the server all 24,576 stayed resident. A Strix Halo default that skips the loan when the unified memory holds both would be a cheap first step toward the zero-copy path asked for here.

Measured and written with an AI assistant (Claude Code).

<!-- gh-comment-id:6025276868 --> @huppiflupp commented on GitHub (Oct 6, 2026): A data point for this, measured on Linux (Ryzen AI Max+ 395, 128 GB, gfx1151, ROCm 7.14.1, Strata 82f46a8, UD-IQ4_XS, `--mmap-experts --expert-cache 24576`, all 24,576 experts resident). With the default borrowing, a 16K prompt lends 2,840 cache slots (6.4 GiB) to the prompt path, streams those experts through host staging during the prompt (6.9 GB copied, 7.9 s of host staging time) and refills the slots afterwards (676 ms). On a unified-memory APU none of that is needed: the memory is there to hold every expert and the prompt buffers at the same time. `--no-prefill-borrow` already gets most of the way: prompt buffers of their own, 0 experts streamed. In the OpenAI server, three distinct ~15K-token prompts, two interleaved rounds each: | | prompt tok/s | answer tok/s (de / code, 600 tokens) | |---|---:|---:| | default (borrowing) | 1,099 | 38.6 / 59.1 | | `--no-prefill-borrow` (plus a Q6_K dense trunk) | 1,157 (+5.2 %) | 38.4 / 60.8 | One caveat: in single CLI runs `--no-prefill-borrow` left only 24,031 of 24,576 experts resident (the reserve), and the decode after the prompt varied with the page cache. In the server all 24,576 stayed resident. A Strix Halo default that skips the loan when the unified memory holds both would be a cheap first step toward the zero-copy path asked for here. _Measured and written with an AI assistant (Claude Code)._
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156040102 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#509
No description provided.