kavin-sai-krishna commented on PR #18040:
URL: https://github.com/apache/tvm/pull/18040#issuecomment-2943856184

   > for operators like this one, we also need legalization rule to know how to 
lower them
   
   @tqchen I came across the PyTorch implementation of this operation and 
noticed that they used `searchsorted`. Following that approach, I’ve used 
`topi.searchsorted` to lower the operation. I also tested the implementation 
numerically with `boundaries = [0, 2, 4, 6, 8, 10]` and `input = [-1, 0, 1, 2, 
3, 4, 5, 6, 7, 8, 9, 10, 11]`, and the results appear to be correct.
   


-- 
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