Repository navigation
tpmoe_sm90: double-buffer the LL all-reduce peer buffers by epoch parity - #1
Merged
Merged
Conversation
rs[]/ag[] were single buffers tagged by epoch. A rank preempted between pushing its T1 messages and reading its peers' does not hold the peers up: they run the next call, overwrite its pending messages, and it spins forever on the old tag. Split both buffers into two epoch-parity halves (RS_PAR/AG_PAR in the kernel, RS_BYTES/AG_BYTES x2 on the host, +11 MiB per rank). A rank is never two calls ahead, so two halves suffice. Numerics unchanged; sources.json re-pinned.
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.
rs[]/ag[] were single buffers tagged by epoch. A rank preempted between pushing its T1 messages and reading its peers' does not hold the peers up: they run the next call, overwrite its pending messages, and it spins forever on the old tag.
Split both buffers into two epoch-parity halves (RS_PAR/AG_PAR in the kernel, RS_BYTES/AG_BYTES x2 on the host, +11 MiB per rank). A rank is never two calls ahead, so two halves suffice. Numerics unchanged; sources.json re-pinned.
📌 Description
🔍 Related Issues
🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.
✅ Pre-commit Checks
pre-commitby runningpip install pre-commit(or used your preferred method).pre-commit install.pre-commit run --all-filesand fixed any reported issues.🧪 Tests
unittest, etc.).🔬 Experimental Track
flashinfer/experimental/and/or an@flashinfer_experimental_api. Tracking issue: #tests/experimental/and were validated on the intended hardware; a runnable example is included.flashinfer/aot.py, and no experimental backend is reachable frombackend="auto"withoutFLASHINFER_ALLOW_EXPERIMENTAL_AUTO_BACKENDS=1. (Calling an@flashinfer_experimental_apior naming a backend explicitly is itself the opt-in and needs no environment variable.)Reviewer Notes