Merge pull request #225 from aneeshjoy/main

Fixed CUBLAS DLL load issues on Windows
This commit is contained in:
Andrei 2023-05-17 15:17:37 -04:00 committed by GitHub
commit 47921a312c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,7 @@ def _load_shared_library(lib_base_name: str):
# Add the library directory to the DLL search path on Windows (if needed) # Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8): if sys.platform == "win32" and sys.version_info >= (3, 8):
os.add_dll_directory(str(_base_path)) os.add_dll_directory(str(_base_path))
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"],"bin"))
cdll_args["winmode"] = 0 cdll_args["winmode"] = 0
# Try to load the shared library, handling potential errors # Try to load the shared library, handling potential errors