Skip to content

Fix graph break in torch.compile when using FA2 with attention_mask=None and batch size > 1#37332

Merged
ArthurZucker merged 10 commits into
huggingface:mainfrom
efsotr:fa2_compile_graph_break
Jun 25, 2025
Merged

Fix graph break in torch.compile when using FA2 with attention_mask=None and batch size > 1#37332
ArthurZucker merged 10 commits into
huggingface:mainfrom
efsotr:fa2_compile_graph_break

Conversation

@efsotr

@efsotr efsotr commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes partial #37199 (comment)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@ArthurZucker

@github-actions github-actions Bot marked this pull request as draft April 7, 2025 06:13
@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@efsotr efsotr marked this pull request as ready for review April 7, 2025 06:13

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can we add a test ! 🤗

Comment thread tests/test_modeling_common.py
@efsotr

efsotr commented Apr 12, 2025

Copy link
Copy Markdown
Contributor Author

due to #37092 , the added test can pass when export DISABLE_KERNEL_MAPPING=1

@llllvvuu

llllvvuu commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Is this ready to merge? @ArthurZucker

@efsotr

efsotr commented Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

ready to merge! @ArthurZucker

@ArthurZucker ArthurZucker enabled auto-merge (squash) June 25, 2025 07:45
@ArthurZucker

Copy link
Copy Markdown
Collaborator

Merging sorry!

@ArthurZucker ArthurZucker merged commit 3ee72af into huggingface:main Jun 25, 2025
20 checks passed
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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.

4 participants