Skip to content

Tests: Unsloth flex mask_mods under fullgraph compile (torch 2.15) - #17854

Merged
danielhanchen merged 1 commit into
mainfrom
torch215-flex-tests
Nov 15, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
torch215-flex-tests

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Test-only coverage for torch 2.15 flex attention. No library code changes.

torch 2.15 (pytorch/pytorch#185738) rejects flex_attention bodies that mutate their inputs or return aliases of captured tensors. Fullgraph compiles raise, and other compiles fall back to eager dense attention.

tests/test_flex_mods_fullgraph.py checks Unsloth's own mask_mods with an aot_eager fullgraph compile against eager flex_attention:

  • the blockwise overlay mask
  • the prefix grouper mask

Results

Setup Result
B200, torch 2.14.1 2 passed in 5 s
Colab T4 (fp16) and L4 (bf16), torch 2.15.0 and 2.14.1 2 passed

Companion: unslothai/unsloth-zoo#2534

torch 2.15 (pytorch/pytorch#185738) rejects flex_attention bodies that
mutate their inputs or return captured-tensor aliases. Check the
blockwise overlay and prefix grouper mask_mods with an aot_eager fullgraph
compile against eager flex_attention.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T17:01:02.927774Z 5e67d84 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 5e67d84ed6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit c8fa28c into main Nov 15, 2026
@danielhanchen
danielhanchen deleted the torch215-flex-tests branch November 15, 2026 17:58
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 16, 2026
Final comment pass for recently merged PRs.

Trims comments added by unslothai#17660, unslothai#17806, unslothai#17807, unslothai#17808, unslothai#17812, unslothai#17830,
unslothai#17854, unslothai#17857 and unslothai#17870 that are still on main.
Multi-line explanations are collapsed to one line, and comments that
restate the code are removed.
Comments that explain a version quirk or a correctness trap are kept,
along with license headers and pragmas.
Changed comment lines: unslothai#17660 5 -> 2, unslothai#17806 4 -> 2, unslothai#17808 1 -> 0,
unslothai#17830 3 -> 1, unslothai#17857 1 -> 0. unslothai#17807, unslothai#17812, unslothai#17854 and unslothai#17870 are
unchanged.
Overall: 6 files, 14 lines removed, 5 added. Only comments change: the
AST check (comment_tools.py check) and the pre-push gate both pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant