mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #807] [CLOSED] cuda: opt-in batched expert uploads to reduce host submission overhead #2839
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#2839
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/807
Author: @midhatn
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:codex/batched-dma-submission📝 Commits (1)
7d6f942cuda: add opt-in batched expert upload submission📊 Changes
5 files changed (+301 additions, -1 deletions)
View changed files
📝
CMakeLists.txt(+10 -0)➕
docs/BATCHED_DMA.md(+114 -0)➕
include/strata/core/dma_batch.hpp(+53 -0)📝
src/core/verify.cpp(+17 -1)➕
tests/core/dma_batch_parity.cu(+107 -0)📄 Description
The verifier's DMA path currently submits one copy per expert. This adds an opt-in
cudaMemcpyBatchAsyncpath for independent pinned expert uploads on CUDA 13+, using the existing copy stream and readiness callback.The useful result is lower host submission overhead. It is not a demonstrated model-speed improvement, so this is a draft and the default stays off.
On Windows with a Ryzen 9 7940HS, RTX 4070 Laptop 8 GB and 64 GB DDR5-5600, 16 registered-host uploads of 2 MiB each measured:
That is 82.7% lower submission latency but only 1.3% lower total transfer latency. A separate repetition using
QueryThreadCycleTimefound about 84.9% fewer submitting-thread cycles. These are separate measurements; neither means an equivalent reduction in whole-model CPU usage or task time.STRATA_DMA_BATCH=1enables batching with--pcie-mode dma. Mode2additionally requests CUDA 13.4's overlap-with-compute hint. Older CUDA and HIP builds retain individual copies, as do single uploads and groups larger than 128. The normal kernel-upload path is unchanged. Registered Windows host pointers are resolved to device-visible aliases, and submission errors fail the engine rather than releasing consumers with stale weights.Validation:
cudaMallocHostand WindowsVirtualAlloc+cudaHostRegister, 378 cases in total. The CMake test targets also pass.docs/BATCHED_DMA.md.The design reference is NVIDIA NCCL's independent-copy batching, using the CUDA batch-copy contract. The helper and tests are new; no NCCL source was transplanted. No other experimental Strata PR is included.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.