-
Couldn't load subscription status.
- Fork 53
Add index_sort implementation
#181
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
Add index_sort implementation
#181
Conversation
eb36ed8 to
660e7a9
Compare
|
@rusty1s PTAL. |
|
Yes, will do. Can you also ping someone from @pyg-team/intel-team for another review? |
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.
LGTM.
a43fe6e to
4014d35
Compare
Codecov Report
@@ Coverage Diff @@
## master #181 +/- ##
===========================================
- Coverage 93.28% 82.18% -11.11%
===========================================
Files 23 26 +3
Lines 745 853 +108
===========================================
+ Hits 695 701 +6
- Misses 50 152 +102
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
52191ae to
f158676
Compare
for more information, see https://pre-commit.ci
In GNN workloads we use
torch.(arg)sortoperation for example when we create permutation from CSR to CSC format. This case happens to be slow in PyTorch because 1-dimensional sorting works sequentially. Generally, in our case, we sort positive integer values in ascending order, so this is a perfect case for a linear sorting algorithm likeradix_sort, which is already implemented in the PyTorch subproject, called fbgemm (here). This PR ports theradix_sortoperation to pyg-lib, in form of a new operation calledindex_sort.For reviewers:
@rusty1s could you please help with LICENSE files, I followed some guidelines, but I feel like it can be done easier.
Profiling results (inference using ogb example,
sortinside csr2csc was replaced withindex_sort):