-
Notifications
You must be signed in to change notification settings - Fork 22.1k
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
Sparse Compressed Transpose add support for Batch dims and BSR/BSC layouts #82122
Conversation
sparse layouts [ghstack-poisoned]
🔗 Helpful links
❌ 1 New FailuresAs of commit 906e60b (more details on the Dr. CI page): Expand to see more
🕵️♀️ 1 failure not recognized by patterns:This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
…compressed" sparse layouts [ghstack-poisoned]
…compressed" sparse layouts [ghstack-poisoned]
…compressed" sparse layouts [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
// the fact that the block should not be possible to hit this code block | ||
TORCH_INTERNAL_ASSERT_DEBUG_ONLY( | ||
false, "transpose(): Shouldn't have reached this point"); | ||
result_vals = AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS( |
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.
I left this code in although support is disabled and the block is unreachable.
Dense dimension support for CSR/CSC is in the immediate future, but I can stash the change locally and bring it back out when we are ready to actually add it if that is preferred.
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
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 LGTM, couple super minor comments inline but really nice overall. Def worth getting @nikitaved's eyes on it too though ofc
aten/src/ATen/native/TensorShape.cpp
Outdated
}; | ||
const auto dim1_type = classify_dim(dim1); | ||
TORCH_CHECK( | ||
classify_dim(dim1) == transpose_type, |
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.
s/classify_dim(dim1)
/dim1_type
?
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
… BSR/BSC layouts" [ghstack-poisoned]
@pytorchbot merge |
@pytorchbot successfully started a merge job. Check the current status here and land check progress here. |
…youts (#82122) Pull Request resolved: #82122 Approved by: https://github.com/bhosmer
Merge failedReason: Failed to merge; some land checks failed: pull, pull / linux-bionic-py3_7-clang8-xla / test (xla, 1, 1, linux.2xlarge) If you believe this is an error, you can use the old behavior with Please reach out to the PyTorch DevX Team with feedback or questions! Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
@pytorchbot successfully started a merge job. Check the current status here and land check progress here. |
…youts (#82122) Pull Request resolved: #82122 Approved by: https://github.com/bhosmer
Hey @amjames. |
…youts (#82122) (#82122) Summary: Pull Request resolved: #82122 Approved by: https://github.com/bhosmer Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9b115c7bd32b4a516f253a217bc8ec47bd07c44d Reviewed By: mehtanirav, izaitsevfb Differential Revision: D39277567 fbshipit-source-id: 9b7ae56319bba48becf8df1eb767683b156d81a3
|
||
// We have validated everything, early exit for equal dims (no effect) | ||
if (dim0 == dim1) { | ||
return self.clone(); |
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.
# correct layout | ||
self.assertEqual(transpose.layout, subject.layout) | ||
# transpose must be return a view | ||
_check_transpose_view(subject, transpose) |
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.
@cpuhrsch re: self.clone()
Why does this check not fail, if the result is not a view?
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.
That's a good question. The test must not hit that branch or the check is too weak. I adopted it from existing view checks. Seems worthwhile investigating.
Stack from ghstack (oldest at bottom):