Conversation
Signed-off-by: Qidi Sang <200703406+qsang-nv@users.noreply.github.com>
Signed-off-by: Qidi Sang <200703406+qsang-nv@users.noreply.github.com>
Signed-off-by: Qidi Sang <200703406+qsang-nv@users.noreply.github.com>
Signed-off-by: Qidi Sang <200703406+qsang-nv@users.noreply.github.com>
When an unrelated outer autotune context replaces the singleton tuner's file cache but no distributed tune group is available, reload the workspace's explicit tuning cache and search it instead of retaining the seed tactic. Expose the runner's group-safe profiling predicate and cover the cache-restore path. Signed-off-by: David Orman <ormandj@corenode.com>
qsang-nv
pushed a commit
that referenced
this pull request
Aug 18, 2026
…nfer-ai#4219) ## Issue flashinfer-ai#4214 Addresses GDN-C1 / GDN-C2 / GDN-C3 / GDN-H1 from the GDN CuTe-DSL cache audit (PR #1 of the suggested sequence). ## Summary - Documented FP16 `q/k/v/a/b` on the BF16-state and FP32-state MTP decode paths were silently reinterpreted as BF16 because the kernels hard-code `cutlass.BFloat16` fragments. Convert those operands to BF16 at the kernel boundary (and stage non-BF16 caller `output=` on MTP). - Add polymorphic operand dtypes (`A_log`, `dt_bias`, slot indices) to the compile-cache identities so mixed-dtype sequences no longer collide. - Stop returning a cached per-batch default `output` buffer from BF16-state paths when `output=None`. - Apply the same FP16 conversion on the WY output-only kernel; convert slot indices to int32 when needed. - Follow-up: non-BF16 MTP `output=` staging uses `output.to(bfloat16)` (not `empty_like`) so negative-index padding rows keep caller-initialized values. - Assert documented `dt_bias` (bf16/fp32) and `initial_state_indices` (int32/int64) dtypes at the public API. ## Test plan - [x] New regressions in `tests/gdn/test_decode_delta_rule.py` (8 parametrizations): FP16 conversion, dtype / `dt_bias` interleaving, default-output non-aliasing, non-BF16 `output=`, padding-slot preservation, WY FP16 - [x] Those regressions fail on unmodified `main` (most on main) and pass on this branch - [x] Full `tests/gdn/test_decode_delta_rule.py`: **838 passed** on H100 NVL (`CUDA_VISIBLE_DEVICES=1`, `-x -vv`, ~38 min) - [ ] GPU CI: `@flashinfer-bot run` ## Review Independent re-review at `024e7c4f`: **approve-with-nits** (padding critical fixed). Follow-up commits add comment trim + API dtype asserts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved validation for tensor data types, shapes, and index values. * Fixed mixed-precision decode workflows, including proper BF16 conversion and preservation of requested output types. * Prevented stale output reuse and preserved padding in partially filled output buffers. * Improved compilation behavior when switching between supported input data types. * **Tests** * Added coverage for FP16/BF16 conversion, output handling, cache isolation, index validation, and mixed-precision correctness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
qsang-nv
force-pushed
the
pcie-ipc-allreduce
branch
from
August 19, 2026 01:25
9936fd5 to
34b6329
Compare
Owner
|
Close this PR as its content is cherry picked in flashinfer-ai@830f79e. Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
This is a focused follow-up to flashinfer-ai#4393.
A caller can wrap model warmup in a FlashInfer autotune context that replaces the singleton tuner's active file cache without installing the distributed process group required to profile the PCIe-IPC collective.
Previously,
PcieIpcAllReduceWorkspacetreated any active autotune context as permission to callchoose_one(). In an unrelated outer context, the workspace could lose its explicitly loaded tuning cache or retain the seed launch configuration.This change:
can_profile()predicate;Serving and autotune validation
The change was exercised in the actual SGLang serving stack, not only through a mocked unit test.
The tested configuration used:
SGLANG_PCIE_IPC_MAX_NUMEL=786432;Both TP ranks initialized PCIe-IPC successfully, the tuned serving configuration remained active after the enclosing autotune context, and the server completed the complete release qualification.
Matched backend profiling
The following measurements establish that the parent PCIe-IPC backend was exercised by the serving stack. They are not presented as isolated performance attribution for this cache-preservation follow-up.
The NCCL and PCIe-IPC captures used matched source, image, model arguments, graph sizes, token IDs, cache policy, and profiler settings. Each result retained 127 complete paired target-plus-draft graph steps.
At C8, all 11,938 captured all-reduce operations used PCIe-IPC. The per-rank timeline reductions were:
Prefill-sized reductions remained on NCCL.
Integration qualification
The source-equivalent release stack containing the outer-autotune fix produced these five-repetition medians:
Cold-prefill aggregate results, with five requests per length:
Quality and long-output results:
finish_reason=stop.These are integration results for the complete serving stack. They are not attributed solely to this follow-up.
🔍 Related Issues
🚀 Pull Request Checklist
✅ Pre-commit Checks
pre-commitby runningpip install pre-commitor used an equivalent environment.pre-commit install.pre-commit run --all-files.🧪 Tests
Focused tests:
uv run --no-project pytest -q tests/comm/test_pcie_ipc_policy.py tests/comm/test_pcie_ipc_tuning.pyThe regression test verifies that an unrelated active autotune context reloads the workspace cache, performs one cache lookup, selects the cached tactic, and does not attempt unsafe collective profiling.
Reviewer Notes
This follow-up does not change PCIe-IPC kernels, topology policy, candidate generation, or the parent PR's tuning algorithm. It only distinguishes a collective-safe tuning context from an unrelated process-global autotune context.
Prepared with AI assistance.