-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[OpInfo] move matmul to OpInfo #55543
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
Conversation
💊 CI failures summary and remediationsAs of commit 6df490f (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
9312e5f
to
d03d0b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #55543 +/- ##
==========================================
- Coverage 77.43% 77.24% -0.20%
==========================================
Files 1892 1892
Lines 187597 187605 +8
==========================================
- Hits 145268 144908 -360
- Misses 42329 42697 +368 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mruberry which one of these skip is worth filing an issue?
I think test_unsupported_dtypes
should definitely be one since neither support nor unsupport passes for float16.
not sure about the other 2 though.
d03d0b6
to
c302658
Compare
((S, S, M, M), (M,), "4d_1d", (True,)), | ||
((M,), (S, S, M, S), "1d_4d", (True,))] | ||
sample_inputs = [] | ||
for input_args in test_cases: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for lhs_shape, rhs_shape in test_cases:
|
||
|
||
def sample_inputs_matmul(op_info, device, dtype, requires_grad): | ||
test_cases = [((L,), (L,), '', (True,)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strings and bools can be removed from this iterable.
Style nit: prefer tuples to lists when the iterable doesn't need to be mutable.
((M,), (S, S, M, S), "1d_4d", (True,))] | ||
sample_inputs = [] | ||
for input_args in test_cases: | ||
args = (make_tensor(input_args[0], device, dtype, low=None, high=None, requires_grad=requires_grad), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lhs = make_tensor(lhs_shape, device, dtype, requires_grad=requires_grad)
rhs = make_tensor(rhs_shape, device, dtype, requires_grad=requires_grad)
sample_inputs.append(SampleInput(lhs, args=(rhs,))
sample_inputs_func=sample_inputs_matmul, | ||
skips=( | ||
# matmul does not correctly warn when resizing out= inputs | ||
SkipInfo('TestCommon', 'test_out'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct and doesn't require an issue (the comments alone are enough to track out= behavior, and many ops do not implement their out= behavior properly)
skips=( | ||
# matmul does not correctly warn when resizing out= inputs | ||
SkipInfo('TestCommon', 'test_out'), | ||
# matmul on complex128 doesn't work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on what's going on here? This may require an issue.
# matmul on complex128 doesn't work | ||
SkipInfo('TestGradients', 'test_fn_grad', | ||
device_type='cpu', dtypes=(torch.complex128,)), | ||
# some how it doesn't throw on cpu, and crash when enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes! Crashing sounds like an issue. Maybe even a high priority issue!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, @walterddr. I made a few suggestions for code simplification and for two issues to file. With those tweaks and links to both issues in comments this should be OK to land!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks @walterddr!
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@walterddr merged this pull request in 08561ca. |
This pull request has been reverted by dab1cdf. |
Looks like this hit another build with no PR CI signal :( Should be a straightforward fix. If you submit it using ci-all/ that will let us validate the issue is resolved. |
Hey @walterddr this PR fails on cuda 11. These tests are currently not run by CI by default. I think you need to add:
to your op-info. Also could you please submit the PR to be relanded to |
Hello @anjali411 & @walterddr, It seems like pytorch/aten/src/ATen/native/Blas.cpp Line 138 in 593295d
The GPUs used are SM75, so the check you mentioned will enable the failing test anyway, i.e. What about not using that sample input if the dtype is Ref for GPU capability:
|
This comment has been minimized.
This comment has been minimized.
Submitting from a branch that starts with "ci-all/" should run all the checks without having to make those changes, though. |
Thanks for this analysis, @imaginary-person. Seems like removing bfloat16 from the list of supported matmul dtypes (on CUDA) is a good idea. What do you think, @walterddr? |
Thank you, @mruberry! That seems a lot more convenient. EDIT: I can't use it, though, as only folks at FB have the permission to do so 😞 |
This comment has been minimized.
This comment has been minimized.
I'm sorry; I thought it was available to everyone. @malfet, do we provide a mechanism for the OSS community to use ci-all? |
No worries, @mruberry! I was able to run tests on CUDA 11.1 by modifying the circle ci config file (temporarily). |
@walterddr, I was wrong about the CUDA compute capability being 75 in the failing test. |
thanks for the report. Let me create a follow PR from the base repo and tag you |
No worries! I only mentioned because I had misinformed you earlier. It seems only Windows tests use SM_75 GPUs. |
Summary: Pull Request resolved: pytorch#55543 Reviewed By: samestep Differential Revision: D27708944 Pulled By: walterddr fbshipit-source-id: c200ded15082eaeed7ba3077a0c8629fed0db505
Summary: This is a reland of pytorch#55543 after fixing bfloat16 issues. Pull Request resolved: pytorch#55947 Reviewed By: mruberry Differential Revision: D27765035 Pulled By: walterddr fbshipit-source-id: b27a769de7686777012194ebbc1f38fc5d4acb67
No description provided.