Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

torchsearchsorted on CUDA #18

Open
ai1361720220000 opened this issue Nov 4, 2020 · 7 comments
Open

torchsearchsorted on CUDA #18

ai1361720220000 opened this issue Nov 4, 2020 · 7 comments

Comments

@ai1361720220000
Copy link

hello, i have installed torchsearchsorted1.1, but when the code comes to error when running
inds = torchsearchsorted.searchsorted(cdf, u, side="right")

Exception: torchsearchsorted on CUDA device is asked, but it seems that it is not available. Please install it.

@krrish94
Copy link
Owner

krrish94 commented Nov 4, 2020

Pytorch 1.6 now includes a torchsearchsorted module (which also works on the CPU)

I'd recommend trying that out instead :)

@ai1361720220000
Copy link
Author

thank you~ i will try it.

@Ilya-Muromets
Copy link

https://pytorch.org/docs/stable/generated/torch.searchsorted.html

Any reason to hold on to the external searchsorted dependency?
Might be easier to swap in the official and require pytorch>=1.6

@krrish94
Copy link
Owner

@Ilya-Muromets no reason at all :)

Just that I haven't been able to get back to working on this repo since I published it

@krrish94
Copy link
Owner

Should be an easy PR if anyone's willing to volunteer

@Ilya-Muromets
Copy link

Ilya-Muromets commented Nov 28, 2020

Made a PR, was just a 2 line change.
Didn't test numerical equivalence, but training 'looks fine'.

Lego example:
image

@Jia-Wei-Liu
Copy link

Hi,
Thanks for sharing your code. I install the pytorch 1.60 but still have the same problem: Exception: torchsearchsorted on CUDA device is asked, but it seems that it is not available. Please install it.
When I try to install torchsearchsorted, it shows Requirement already satisfied.
Can anyone help me? Thank you very much!
Best regards!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants