Repository navigation
Flash Next native: split graphs at the gathers, one captured step for every sequence (+10-15% one stream) - #9
Merged
Merged
Conversation
…gather (TENSORFOLD_FN_SPLIT_GRAPHS) The gathers then run eager between the graph segments, the same work in the same order (the payload and the sum untouched). fn-native's "split" word runs the exactness checks that way.
…_FN_SPLIT_GRAPHS=0 keeps one graph a step)
…FN_SHARE_GRAPHS=0: each its own) Every sequence lays out its memory alike, so at capture each kernel node's arguments are read (the driver's parameter info) and the ones pointing into the capturing sequence's allocation or cache range are noted; another sequence's launch moves just those by the base difference in the executable graph. A copy, memset or other node that touches the sequence keeps the plan to that sequence. At most 96 plans, the least recently launched freed.
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.
Two single-stream speedups on
native-v1.0.4, both on by default. Outputs are bit-identical.Split graphs at the cross-rank gathers (
TENSORFOLD_FN_SPLIT_GRAPHS=0turns it off). A captured step now ends a graph at each partial-sum gather. The gather then runs eager between graph segments, with the same payload, sum and order. On GB10 a gather inside a graph costs about 25 µs, against 16 µs eager, for one row.One captured step serves every sequence (
TENSORFOLD_FN_SHARE_GRAPHS=0turns it off). Graphs used to be keyed by the sequence's address, so each new request recaptured 40-48 graphs. Every sequence lays out its memory alike, so at capture the change does three things:cuFuncGetParamInfo/cuKernelGetParamInfo;cuGraphExecKernelNodeSetParams.Copy and memset nodes are read too. A plan with a node that touches the sequence and can't be moved keeps the per-sequence key. At most 96 plans are held, and the least recently launched is freed first. Sharing needs split graphs: with gathers inside the graph, the NCCL nodes keep plans per sequence.
Exactness, fn-native on two GB10s:
Served checks on every variant: structured output 0 failures, 20 sampled replies without errors, resumed turn equal to fresh, URLs. Suite on split + shared: drafts 12/12, concurrent 12/12, behaviour all pass.
Ruler, int8, tok/s (prose / code / structured / list), fresh server:
bc0402c1)At 4 and 8 users, every variant is within noise of the baseline. Graph log with split + shared: 96 plans held, all shared, and 0-9 captures a request, against 36-41 before.