Repository navigation
Respect deterministic settings in fused pre-GDR gate backward - #8244
Open
Pinoeer-kingxi wants to merge 3 commits into
Open
Pinoeer-kingxi wants to merge 3 commits into
Pinoeer-kingxi wants to merge 3 commits into
Conversation
6 of 7 tasks
Signed-off-by: Pinoeer-kingxi <13022943007@163.com>
Pinoeer-kingxi
force-pushed
the
fix/gdn-gate-backward-replay
branch
from
October 15, 2026 07:54
9ff49d7 to
9d54b87
Compare
5 of 6 tasks
Pinoeer-kingxi
marked this pull request as ready for review
October 16, 2026 13:03
6 of 7 tasks
Signed-off-by: Pinoeer-kingxi <13022943007@163.com>
Signed-off-by: Pinoeer-kingxi <13022943007@163.com>
This branch has not been deployed
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.
What does this PR do?
The fused pre-GDR gate backward accumulates
A_loganddt_biasgradients with atomics. Add an ordered reduction when the existing deterministic setting requests it, while preserving the default autotuned atomic reduction.When
use_deterministic_mode()returnsTrue, each program writes independent FP32 partial sums and the caller reduces them on the existing stream. The tile comes from the sharedautotune_configsselector; that same config determines scratch capacity and launch parameters. This supports explicit block-size overrides and runtime mode changes without a fixed 128×16 launch.With determinism disabled, the original autotuner, candidate list and atomic accumulation remain in use, with the original accumulator size. Pinning autotune by itself does not enable ordered arithmetic. The deterministic selector uses the existing block-size/min-cost selection, not tuned-table lookup.
Full pre-GDR fusion still rejects model
deterministic_mode=True; this PR does not enable deterministic execution of the entire fused model. No activation-offload code changes are included.Validation
Final source:
d8115c4c3bf52a868b242d032b5519d7c3331a52, compared with upstream9131593673d037d360d252904f9198d36bc0c246.9d54b872fails the new default-dispatch regression test after executing the actual backward; the final source passes.1.19e-7. The original strict state comparison fails, as it also does for the upstream rerun. These failures are retained; default atomic training is not claimed to be bit-exact.cc09983franged from −3.45% to +5.51% (paired median +0.64%). No stable throughput change is established.tools/autoformat.shpasses in check mode. Its nonblocking mypy stage reports the same four diagnostics as upstream; no new diagnostic remains.Commands, per-rank logs, raw samples, state differences, traces and offline verification identify each executed revision. These are local results; upstream GPU CI is still pending for this head.
The historical fixed-128×16 wrapper benchmark belongs to
9d54b872. Its 5.9%–8.7% wrapper gains and 2–32 KiB increase do not qualify this implementation or establish end-to-end speedups.Issue tracking
Related to #6757. Split from #7908 following the requested review boundaries. #7908 preserves the upstream fused kernels and does not depend on this PR.
Contribution process
Pre-checks
tools/autoformat.sh(check mode).