-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix sum OpInfo for sparse sample inputs and assert coverage for sparse-enabled operators #100391
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/100391
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 45bf2d5: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc alexsamardzic nikitaved cpuhrsch amjames bhosmer [ghstack-poisoned]
This PR enables sum tests for sparse sample inputs. Previously, the tests existed but were never run because the sum OpInfo instance was created without specifying `supports_sparse_*=True`. To avoid such mistakes in the future, the following PR #100392 enables the `supports_sparse_*` flags automatically when OpInfo creation specifies `sample_inputs_sparse_*_func`. In addition, the PR applies several fixes to sum tests for sparse sample inputs. cc alexsamardzic nikitaved cpuhrsch amjames bhosmer [ghstack-poisoned]
…ction implies the corresponding layout support" As in the title. The PR fixes an issue of silently skipping tests as described in #100391. [ghstack-poisoned]
…e corresponding layout support" As in the title. The PR fixes an issue of silently skipping tests as described in #100391. [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.
Updated the title to better reflect what this achieves.
This is great! Hopefully this way if an operation that's part of OpInfo supports sparse inputs we will have it covered. Good steps towards making sure we'll reach stability.
…ding layout support (#100392) As in the title. The PR fixes an issue of silently skipping tests as described in #100391. Pull Request resolved: #100392 Approved by: https://github.com/pmeier, https://github.com/cpuhrsch
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391.
Simplify the dispatch Add UT Fix the bug of index_type in reduce_sparse_csr_dim0_cpu_template Use opmath_t as reduction type Fix CI failures The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391. Remove the change in test_sparse_csr.py Remove AT_DISPATCH_INDEX_TYPES based on comments Remove to(torch.int64) explicitly and change input data type to torch.int64 Support integral return value in reduce_sparse_csr_cpu_template Refactor according to comments Abstract to_type in sparse_csr Update based on comments
Simplify the dispatch Add UT Fix the bug of index_type in reduce_sparse_csr_dim0_cpu_template Use opmath_t as reduction type Fix CI failures The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391. Remove the change in test_sparse_csr.py Remove AT_DISPATCH_INDEX_TYPES based on comments Remove to(torch.int64) explicitly and change input data type to torch.int64 Support integral return value in reduce_sparse_csr_cpu_template Refactor according to comments Abstract to_type in sparse_csr Update based on comments
Simplify the dispatch Add UT Fix the bug of index_type in reduce_sparse_csr_dim0_cpu_template Use opmath_t as reduction type Fix CI failures The failures are from: 1. SparseCsrCPU includes csc, bsr, bsc, except for csr. csr is only supported for now, csc can be easily converted to csr, while bsr and bsc are not. 2. This PR has conflict with pytorch#100391. Remove the change in test_sparse_csr.py Remove AT_DISPATCH_INDEX_TYPES based on comments Remove to(torch.int64) explicitly and change input data type to torch.int64 Support integral return value in reduce_sparse_csr_cpu_template Refactor according to comments Abstract to_type in sparse_csr Update based on comments
This PR enables sum tests for sparse sample inputs. Previously, the tests existed but were never run because the sum OpInfo instance was created without specifying
supports_sparse_*=True
. To avoid such mistakes in the future, the following PR #100392 enables thesupports_sparse_*
flags automatically when OpInfo creation specifiessample_inputs_sparse_*_func
.In addition, the PR applies several fixes to sum tests for sparse sample inputs.
Stack from ghstack (oldest at bottom):
cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer