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

bwinline: Forceinline all functions of the bw #453

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

danthe3rd pushed a commit that referenced this pull request Oct 3, 2022
ghstack-source-id: ad077080cb8cfef645610b2bfbac9def4ef6e179
Pull Request resolved: #453
@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 Oct 3, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2022

Codecov Report

Base: 91.39% // Head: 91.39% // No change to project coverage 👍

Coverage data is based on head (5c5ae07) compared to base (59610f6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           gh/danthe3rd/44/base     #453   +/-   ##
=====================================================
  Coverage                 91.39%   91.39%           
=====================================================
  Files                        75       75           
  Lines                      4417     4417           
=====================================================
  Hits                       4037     4037           
  Misses                      380      380           
Flag Coverage Δ
Python 91.39% <ø> (ø)

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

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

Thanks!

Comment on lines +114 to +129
head_dim = warp_uniform(head_dim);
head_dim_value = warp_uniform(head_dim_value);
num_queries = warp_uniform(num_queries);
num_keys = warp_uniform(num_keys);

query_ptr = warp_uniform(query_ptr);
key_ptr = warp_uniform(key_ptr);
value_ptr = warp_uniform(value_ptr);
logsumexp_ptr = warp_uniform(logsumexp_ptr);
output_ptr = warp_uniform(output_ptr);
grad_output_ptr = warp_uniform(grad_output_ptr);
delta_ptr = warp_uniform(delta_ptr);

grad_query_ptr = warp_uniform(grad_query_ptr);
grad_key_ptr = warp_uniform(grad_key_ptr);
grad_value_ptr = warp_uniform(grad_value_ptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

note to self: this trick is needed otherwise there would be a performance slowdown

@danthe3rd danthe3rd merged commit 5c5ae07 into gh/danthe3rd/44/base Oct 6, 2022
danthe3rd pushed a commit that referenced this pull request Oct 6, 2022
ghstack-source-id: ad077080cb8cfef645610b2bfbac9def4ef6e179
Pull Request resolved: #453
@danthe3rd danthe3rd deleted the gh/danthe3rd/44/head branch October 6, 2022 12:08
bertmaher pushed a commit to bertmaher/xformers that referenced this pull request Dec 20, 2024
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.

4 participants