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

Try fix ck decoder compilation in fbcode (2/n) #1012

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

tenpercent
Copy link
Contributor

What does this PR do?

Fixes compilation error in cpp extensions for decoder and splitk decoder.
A few issues were fixed

  • fbcode has -Werror flag enabled, but OSS did not
  • the kernel wrapper definitions hid the virtual functions defined at base invoker
  • while hiding, the signature was also changed, so I had to add an extra casting step to make the compiler happy
  • while testing the change I got spurious accuracy errors, which I got rid of by copying the args struct instead of using a reference, as it's allocated on stack somewhere and the existing way is not safe

Test plan

# pytest /xformers/tests/test_mem_eff_attention.py -k decoder (a few times)

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.
cc @jianyuh @qianfengz

@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 Mar 29, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.72%. Comparing base (132da6a) to head (02d089c).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1012      +/-   ##
==========================================
- Coverage   60.73%   60.72%   -0.01%     
==========================================
  Files         113      113              
  Lines        9769     9777       +8     
==========================================
+ Hits         5933     5937       +4     
- Misses       3836     3840       +4     
Flag Coverage Δ
Python 60.72% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danthe3rd danthe3rd merged commit 09773f8 into facebookresearch:main Apr 2, 2024
32 checks passed
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