How to check if OptiX is available #360
-
I ran into a similar error as mentioned in #167, but for When loading Mitsuba, I receive:
However, if I insist on running with a CUDA variant, I receive Is there a way to check if OptiX is available, using Thanks! EDIT: I think I found the relevant part of the code ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The mechanism to dynamically load shared libraries is mostly handled by You would need to mimic it's behaviour, which is pretty straightforward. All we're doing is |
Beta Was this translation helpful? Give feedback.
-
Thanks to the input of @njroussel, I came up with the following function that checks if OptiX is available: import ctypes
def is_optix_available() -> bool:
"""Check, if OptiX is available."""
try:
ctypes.cdll.LoadLibrary("libnvoptix.so.1")
except OSError:
return False
return True |
Beta Was this translation helpful? Give feedback.
Thanks to the input of @njroussel, I came up with the following function that checks if OptiX is available: