Closed enrico-lattuada closed 7 months ago
After a long struggle, I have found the problem with the CUDA-enabled library.
Starting from Python 3.8, on Windows, the Path
system variable is not used anymore to look for DLLs (in our case, for the CUDA Toolkit dynamic libraries).
See here.
A possible workaround is to add the CUDA toolkit path to the DLL search using os.add_dll_directory()
in the __init__.py
file.
For example, this solution works:
# non CUDA related imports
# ...
if IS_CUDA_ENABLED:
import sys, os
if sys.platform == "win32":
# add the CUDA Toolkit bin directory, where the DLLs are stored
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "bin"))
# import the _core_gpu module
# ...
Closed by #175
Description Improve the readability and future maintenance of C++ and CUDA functions.
Proposed solution Split the elementary functions on C++ and CUDA side to be used from Python (e.g., FFT2, etc.).
Additional context Splitting the functions would allow us not only to improve the readability and future maintenance of the code but also to spot possible improvements in speed or accuracy, and write function tests.