Skip to content

Commit

Permalink
Use __path__ instead of __file__ in load_cuda() (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
jllllll authored Aug 7, 2023
1 parent a2a5384 commit d537788
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ctransformers/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,7 @@ def load_cuda() -> bool:
import nvidia
except ImportError:
return False
if not nvidia.__file__:
logger.warning(
"CUDA libraries might not be installed properly. "
"Please report at https://github.com/marella/ctransformers/issues"
)
return False
path = Path(nvidia.__file__).parent
path = Path(nvidia.__path__[0])
system = platform.system()
if system == "Windows":
libs = [
Expand Down

0 comments on commit d537788

Please sign in to comment.