fynv / ThrustRTC

CUDA tool set for non-C++ languages that provides similar functionality like Thrust, with NVRTC at its core.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failing with exception in case CUDA not available

slayoo opened this issue · comments

Currently, even a ThrustRTC hello-world like

import ThrustRTC
a = ThrustRTC.device_vector_from_list([1, 2, 3, 1, 2], 'int32_t')

when run on a machine without CUDA, fails ungently halting python:

libcuda.so not found
Cannot find CUDA driver. Exiting.

It would be great to raise an exception so that a user can catch it.

Perhaps it would even be better to report it by the import statement so one can try: import ThrustRTC (same for CURandRTC)

Thanks

The current behavior is even more troublesome for Jupyter users:
image

Yes, it is true I over-simplified the error handling. Thanks for pointing this out.
I've just updated ThrustRTC/CURandRTC to 0.3.5/0.1.5.
Please check and see if the current behavior is what you are expecting.

I had the same problem and ThrustRTC 0.3.5 fixed it.

Perfect. Thank you!