Repository navigation
[TransferEngine] Add opt-in high-priority HIP copy streams - #5005
ShangmingCai merged 1 commit into
Conversation
13df6a6 to
8313ccc
Compare
|
Rebased onto main The stream-pool implementation and test source are unchanged, so the prior allocated MI355X 4/4 CTest evidence remains applicable to that delta; no new GPU run or full wheel build is claimed. Checked #4953 at New-head CI update: the CUDA CTest build now fails before tests in |
Signed-off-by: yihou <yihou@amd.com>
8313ccc to
b118a28
Compare
* upstream/main: (95 commits) [Bugfix][TENT] Honor EFA protocol in classic shim (kvcache-ai#5280) [Doc] Add the AMD ATOM integration and homepage blog posts (kvcache-ai#5380) [Store-RS] Fence Store-RS eviction and delete by allocation identity (kvcache-ai#5243) fix: preserve integer map keys in structured non-tensor reads (kvcache-ai#4603) [Bugfix][TE][Store] Fix CXI transport so Mooncake Store works over Slingshot (kvcache-ai#5454) [Store] Coalesce removal KV events before publishing (kvcache-ai#5467) [CI/Build][Doc] Ship EFA in the default wheels only (kvcache-ai#5322) [CI/Build][Doc] Ship EFA in the default wheels only (kvcache-ai#5322) [Store] Shard LeaseEvictionIndex and parallelize memory eviction (kvcache-ai#5448) [TransferEngine] Open intra-node NVLink IPC mappings on the source buffer's device (kvcache-ai#5443) [Bugfix][TENT] Temporarily disable smart scheduling by default (kvcache-ai#5445) [TENT] Add a blocking waitTransfer entry point (kvcache-ai#5415) [EP] Add planned runtime scaling to ElasticBuffer (kvcache-ai#5376) [Store] Persist object upload and cleanup recovery records (kvcache-ai#5310) [TransferEngine] Add opt-in high-priority HIP copy streams (kvcache-ai#5005) [Store] feat: break master key count and value bytes down by configurable key groups (kvcache-ai#5393) [Store] Populate HugeTLB EFA segments in parallel (kvcache-ai#5457) [CI/Build] Prevent OOM in PR unit-tests build on GitHub-hosted runners (kvcache-ai#5420) [Store] Add automatic pipelined gather to ranged reads (kvcache-ai#4502) [Store] Add property tests for structured member byte-range plans (kvcache-ai#5328) ...
Description
Add opt-in
MC_HIP_STREAM_PRIORITY=highfor HIP transfer streams. A transfer stream at the normal priority can wait behind compute work; high priority requests the device's greatest supported stream priority while preserving nonblocking semantics. Unset/defaultretains today's behavior, and invalid values warn and use the default. This is a scheduling hint, not a guarantee of preemption.Rebased the yihou M02 patch onto Mooncake main
72e267f4on 2026-11-02. The original HIP validation below was performed at13df6a68; the stream-pool implementation and its test source are unchanged by this rebase. Historical isolated peer-copy experiments R039/R043 reported a roughly 200 ms to 11 ms stall reduction behind long kernels. The prepared priority image was never used for an end-to-end serving run, and that historical number is not a measurement of this new revision. No simulated-acceptance or combined-stack throughput is claimed.#4953 changes HIP asynchronous batch submission; it does not add this stream-priority selection. #4340 is an independent IPC correctness fix owned by its author, tracked separately.
Suggested Merge Priority
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
On an allocated MI355X with ROCm 7.2:
cmake -S . -B /data/yihou/glm52-upstream-20261027/mooncake-build \ -DUSE_HIP=ON -DUSE_CUDA=OFF -DWITH_STORE=OFF -DWITH_STORE_RUST=OFF \ -DBUILD_UNIT_TESTS=ON -DBUILD_EXAMPLES=OFF cmake --build /data/yihou/glm52-upstream-20261027/mooncake-build --target hip_stream_pool_test -j 8 ctest --test-dir /data/yihou/glm52-upstream-20261027/mooncake-build \ -R hip_stream_pool_ --output-on-failure4/4 registered CTest cases pass: default/high/invalid/unset, each with priority/flags/round-robin/byte-copy and zero-count tests. Direct compilation with
hipcc -std=c++17 -Wall -Wextra -Werroralso passes. With the unmodified main stream-pool implementation, the high-priority test fails (observed priority 0, expected -1), while the zero-count control passes.All applicable PR-scoped pre-commit hooks pass with clang-format 20.
make -C docs htmlsucceeds and the new environment option appears in the generated page. Initial full configure required initializing the existingextern/pybind11submodule; configure/build/CTest then succeeded.Checklist
AI Assistance Disclosure
Follow-up, 2026-11-02
The old Python 3.10 wheel failure was
ModuleNotFoundError: mooncake._structured_ranges, introduced in the base by #3954 and fixed by merged #5030. This branch now includes that fix. The packaging source regressionpython -m pytest -q python/tests/packaging/test_project.py::test_structured_object_storage_has_one_authoritative_sourcepasses (1 test), and all applicable PR-scoped pre-commit hooks pass. Upstream CI is rerunning; a complete wheel rebuild was not performed locally.The current #4953 revision (
35c488e9) still acquires streams throughstream_pool_.getNextStream(device_id)and does not change the stream pool's priority creation. Source review finds no competing priority implementation; combined runtime qualification is not claimed. #4953 is coordination work, not an established mandatory merge dependency for this opt-in.Review and validation status
New-head CI update: the CUDA CTest build now fails before tests in
on_cuda_transport_guard_testbecausemooncake_te_build_config.his not on its include path (job). The target/test/header are unchanged from main in this PR. Existing #5144 fixes this distinct base regression; it is open and tracked as the current build blocker. This is separate from the old wheel issue fixed by #5030.Follow-up, 2026-11-12
Rebased without conflicts onto main
f959efbe. Signed headb118a28e. The earlier generated-header build blocker #5144 is now merged and included (d872c349); the previous CI note above describes the historical November 2 run. The HIP stream-pool implementation and HIP test source are byte-identical to the previous PR head8313cccb. All applicable PR-scoped pre-commit hooks and the structured-ranges packaging regression (1 test) pass locally. No new GPU or serving benchmark was run; prior scoped HIP evidence remains historical. Fresh upstream CI is requested by the push/ready transition. Human line-by-line review is still pending and is not claimed complete.