-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for index_select OP (backend implementation) #2183
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
…port arbitrarily rank; 2) support arbitrarily dim value; 3) index_tv can become consumer; 4) lookup_tv cannot become consumer. TODO: move index calculation from codegen.cpp to lower_index.cpp
2) mv test_index_select.cpp to torch/csrc/jit/codegen/cuda/test/ 3) refine code
|
@zasdfgbnm added support of |
e67cb84 to
4b2fea4
Compare
4b2fea4 to
ddd9742
Compare
Referred to Xiang's impl and moved lower_index from codegen.cpp to lower_index.cpp |
|
@azazhu Can you please also add a validation check to |
…Output 3. add func in validateIr
|
naoyam
left a comment
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. Just left one more minor comment.
Thanks for adding this new operator!
This PR is backend implementation of index_select(lookup_tv, dim, index_tv) fusion:
OP def is here: https://pytorch.org/docs/stable/generated/torch.index_select.html
TODO: move index calculation from codegen.cpp to lower_index.cpp