teddykoker / torchsort

Fast, differentiable sorting and ranking in PyTorch
https://pypi.org/project/torchsort/
Apache License 2.0
765 stars 33 forks source link

cuda extension install nvcc version #50

Closed frederickhoffman closed 2 years ago

frederickhoffman commented 2 years ago

What version of nvcc is required to install the cuda extension? Does it just have to match that used to install pytorch?

teddykoker commented 2 years ago

Yes - on my own machine I am using nvcc release 11.3, with torch==1.10.2+cu113. I have tested release nvcc 10.2 with torch==1.10.2 as well. Let me know if you are running into any issues and I can help!

frederickhoffman commented 2 years ago

Hi Teddy,

I've compiled the extension using cuda 10.2 and I've run through the examples which all work on both CPU and GPU from a .py script. Strangely the same commands cause segmentation faults for GPU in a jupyter notebook and also as part of a pytorch lightning training procedure in a python script. Both work for CPU. Which has left me scratching my head. Any advice would be greatly appreciated.

Cheers, Fred

On Tue, 15 Mar 2022, 13:00 Teddy Koker, @.***> wrote:

Yes - on my own machine I am using nvcc release 11.3, with torch==1.10.2+cu113. I have tested release nvcc 10.2 with torch==1.10.2 as well. Let me know if you are running into any issues and I can help!

— Reply to this email directly, view it on GitHub https://github.com/teddykoker/torchsort/issues/50#issuecomment-1067961968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUQUFS7NZQPQ6JJ2Q4EVOPLVACCYFANCNFSM5QR5OBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

teddykoker commented 2 years ago

Is there any way you could provide a small sample of your notebook/training script so that I could try and reproduce? Given your description I'm not sure exactly what the issue might be. Does the segmentation fault remain if you remove call to torchsort?

frederickhoffman commented 2 years ago

Hi Teddy, sure, here is an example of running a gpu torchsort example in a notebook. This kills the notebook. It works in cpu mode. I'll also provide a pytorch lightning example, just putting together now. Cheers, Fred

On Wed, 16 Mar 2022 at 02:30, Teddy Koker @.***> wrote:

Is there any way you could provide a small sample of your notebook/training script so that I could try and reproduce? Given your description I'm not sure exactly what the issue might be. Does the segmentation fault remain if you remove call to torchsort?

— Reply to this email directly, view it on GitHub https://github.com/teddykoker/torchsort/issues/50#issuecomment-1068668214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUQUFSYAJEW7IBOWZVNMQZ3VAFBTXANCNFSM5QR5OBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

teddykoker commented 2 years ago

Fred, could you try to send the examples again? I’m not sure if you attach them in an email if they are uploaded to GitHub

frederickhoffman commented 2 years ago

Everything is now fixed after reinstalling everything from scratch. Thanks for all the help Teddy!