-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Intrinsic] lower_bound and upper_bound for binary search in Sparse TIR. #483
Conversation
Another question is, how shall we implement binary search for llvm? |
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!
Hi @yzh119 @MasterJH5574, I merged a PR apache/tvm#9184 that implements binary search in TIR using while loop. Specifically, this function https://github.com/masahi/tvm/blob/431db6b3f450e6ff61056e632d2413903d7411e0/python/tvm/topi/searchsorted.py#L25 generates binary search IR that is used by both CPU and GPU backends. Probably we don't have to implement the intrinsic specifically for CUDA. I hope TIR while loop is generally useful for sparse-related projects. |
@masahi thank you! Yes I noticed that file before, but it's inside topi folder. |
Yes! That sounds great. I added |
Implement the intrinsic on CUDA for Sparse TIR (#466 ).
cc @junrushao1994 @MasterJH5574 .