-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add sparse compressed fake tensor support #120920
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
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/120920
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 968a6cf with merge base 2e50566 ( BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip [ghstack-poisoned]
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip [ghstack-poisoned]
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng [ghstack-poisoned]
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng [ghstack-poisoned]
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng [ghstack-poisoned]
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng [ghstack-poisoned]
elif is_sparse_compressed(t): | ||
is_leaf = safe_is_leaf(t) | ||
|
||
def mk_meta(): |
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 function is weirdly a lot more complicated than the one in sparse_coo above, not sure if it's needed or not yet
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 guess the problem is you don't have a constructor that just directly takes sparse/dense dim and allocates those tensor under the hood, do you...
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.
Exactly, we don't have _sparse_coo_tensor_with_dims
-alike for sparse compressed tensors. I could expose one as an aten operator but does it matter if it is either implemented in Python (as above) or in C++? IIRC, their specification will be the same: construct as sparse compressed tensor with indices and values as empty tensors with device='meta' and nnz==0
.
What do you think?
... not sure if it's needed or not yet
It surely appears to be needed as without it a bunch of dynamo tests is failing.
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
As in the title. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer jcaip voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang aakhundov [ghstack-poisoned]
@pytorchbot merge -f "The 4 CI failures are not related to the changes in the PR" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
As in the title.
Stack from ghstack (oldest at bottom):
cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer @jcaip @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @aakhundov