Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] blocksparse sanity checks #207

Merged

Conversation

blefaudeux
Copy link
Contributor

@blefaudeux blefaudeux commented Feb 5, 2022

What does this PR do?

Fixes #206, constraints the block sizes to being the ones we actually uni tests. Other sizes probably work but bring no benefit really, since you can express the pattern with the smaller blocks

Before submitting

  • Did you have fun?
    • Make sure you had fun coding 🙃
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
    • N/A
  • Did you make sure to update the docs?
    • N/A
  • Did you write any new necessary tests?
    • N/A
  • Did you update the changelog? (if needed)
    • N/A

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 5, 2022
@blefaudeux blefaudeux changed the title blocksparse sanity checks [fix] blocksparse sanity checks Feb 5, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #207 (d992171) into main (8008a3f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #207   +/-   ##
=======================================
  Coverage   91.62%   91.62%           
=======================================
  Files          59       59           
  Lines        2998     2998           
=======================================
  Hits         2747     2747           
  Misses        251      251           
Flag Coverage Δ
Python 91.62% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
xformers/components/attention/blocksparse.py 94.20% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8008a3f...d992171. Read the comment docs.

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

LGTM!

With #202 merged, my idea would be to eventually deprecate this module, as it is already covered by the scaled_dot_product_attention. But we can discuss about this next week

@blefaudeux blefaudeux merged commit 83eb4a7 into facebookresearch:main Feb 7, 2022
@blefaudeux
Copy link
Contributor Author

LGTM!

With #202 merged, my idea would be to eventually deprecate this module, as it is already covered by the scaled_dot_product_attention. But we can discuss about this next week

It's not there yet, and the issue was present right now..

xwhan pushed a commit to xwhan/xformers that referenced this pull request Feb 8, 2022
@blefaudeux blefaudeux deleted the blocksparse_size_assert branch September 4, 2022 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blocksparse gives RuntimeError: CUDA: Error- illegal address when increase the block size
4 participants