Flydsl attn res - #4610
Draft
anhminhnguyenhoang wants to merge 11 commits into
Draft
Conversation
This gives correctness tests a simple golden implementation to compare against the future FlyDSL kernel. Co-authored-by: Cursor <cursoragent@cursor.com>
Implements the nine-source online softmax path for D=7168 with a correctness test against the torch reference. Co-authored-by: Cursor <cursoragent@cursor.com>
Add compile-time flags for delta, snapshot write, and output RMSNorm, with tests for mix-only and fused append at num_blocks 0 and 7. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Let delta, snapshot, and output RMSNorm specialize independently while keeping canonical append writes, and match the kernel's FP32-to-BF16 prefix update in the torch reference. Co-authored-by: Cursor <cursoragent@cursor.com>
Tensor rows may now carry trailing padding, which callers need when a hidden dimension is stored in a wider buffer. The kernel already handled this: raw tensors pass their strides to FlyDSL at launch, so a padded row is addressed correctly without recompiling. Only the host-side is_contiguous() gate stood in the way. That gate is replaced by a layout check requiring a unit trailing stride and 16-byte-aligned row starts, which is what the 128-bit copy needs. A padding of 7 elements leaves rows 2-byte aligned and is rejected with a clear error; supporting it would cost a narrower, slower copy path. Tests cover padding of 8 and 16 across the flag surface, verify padding columns are never written, and check the rejected layouts. Co-authored-by: Cursor <cursoragent@cursor.com>
Derive wave-aligned block threads from D, use shuffle-only reductions for single-wave rows, and extend tests and benchmarks for D=1024 while keeping D=7168 unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist