mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#4266
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/2788
Author: @iskamag
Created: 10/16/2026
Status: ❌ Closed
Base:
main← Head:fix/hip-adapt-kernel-copy-async📝 Commits (1)
a976e2ahip: route the asynchronous adaptive tier through adapt_copy_h2d (#884)📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
src/program/generate.cpp(+5 -3)📄 Description
Title
Issue: relates to #884 — it makes that switch effective on a path it never reached. It does not claim to fix the ROCm barrier itself.
Summary
STRATA_HIP_ADAPT_KERNEL_COPY=1(#884) is dead code whenever--adapt-async 1is on. The asynchronous adaptive tier copies its swaps in with a rawcudaMemcpyAsyncand never callsadapt_copy_h2d(), so every swap goes back over SDMA — the combination #884 exists to avoid. On gfx1030 the queue then dies withHSA_STATUS_ERROR_INVALID_PACKET_FORMAT(the malformed barrier packet), which the server reports asverify: layer 0 never rang (unspecified launch failure).What changed
src/program/generate.cpp,a_in_one(the async tier's step-2 copy in):cudaMemcpyAsync(...)→adapt_copy_h2d(...), the helper the blocking tier already calls. Two lines.The stream, the asynchrony and the fallback are unchanged:
adapt_copy_h2dends in the identicalcudaMemcpyAsyncwhen the switch is off or the source is not mapped, so with the switch off this is behaviourally the old code.Leaves alone: the blocking tier,
a_back(the D2H side has no kernel-copy helper), andsycl/src/program/generate.cpp(its ownadapt_copy_h2d, same gap).Evidence
gfx1030 (RX 6800), ROCm 7.13.0a, 0.1.44.1 source,
--adapt-async 1 --adapt-swaps 160 --kv-resident 32768 --cache-suffix-reuse 64, arena mode, 250 MiB VRAM free, same config and box:The switch's own line (
adaptive swaps copy with a kernel, not SDMA (#884)) appears once with the patch and never without it. It is printed on the helper's first call, anda_in_oneis the only GPU copy this config makes, so the line is the proof the helper is now reachable.Cost — 3 alternating rounds, 512 greedy tokens each, medians:
−2.2% / +0.3%: no measurable cost, as the #884 reporter also measured.
Extra Notes
src/program/generate.cppis one target for HIP and CUDA; the SYCL engine builds a separate file,sycl/src/program/generate.cpp, whoseadapt_copy_h2dhas the same gap — left alone deliberately rather than hand-edited dpct output I cannot compile.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.