torchsearchsorted
torchsearchsorted copied to clipboard
Implemented `side` parameter (resolves #1)
This PR includes:
- C++ code for searchsorted with correct support of
side=[left|right]
- CUDA code for searchsorted with correct support of
side=[left|right]
- helper functions for broadcasting numpy arrays and pytorch tensors to be used in searchsorted
- more unit tests to make sure all of the above work
- minor changes in the README (how to check CUDA availability during installation, how to run tests, how to run the benchmark)
- new benchmark script that uses the builtin
timeit
Please check out the new implementation (the CUDA and C++ part should be much more readable), run the unit tests and let me know if you get similar times in the benchmark ;)
thank you very much I'll review this shortly
I've noticed the speed issue, I think it could be related to the left/right side, which at least in this version gives correct results. Anyway, I'll look into speeding up the implementation ;)