yzh119 opened a new pull request #10562:
URL: https://github.com/apache/tvm/pull/10562


   The search sorted function was used in the sparse-tir project to perform 
binary search on indices array. I need to rebase the sparse-tir repo to relax 
project so I need to push some changes upstream. This PR adds the search sorted 
function to TIR built-ins. The semantic of `searchsorted` is the same as 
numpy's 
(https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html), we 
add two arguments `offset_l` and `offset_r` to indicate the interval bound.
   
   @masahi suggests using IRBuilder to define the fine-grained description of 
binary search. However, at current stage I don't want to decompose the binary 
search to more fine-grained instructions (this would make the intermediate IR 
too redundant, and not convenient for scheduling).
   
   I leave the codegen on LLVM a future work.
   
   @MasterJH5574  @junrushao1994 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to