Torch.Cuda Is Available Condition and Warning (#1545)
* check for torch.cuda and triton if available on my machine(mac m3) the cuda were not available * Update pyproject.toml * Update __init__.py --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com>
This commit is contained in:
parent
5266a43d0b
commit
6b22725df7
1 changed files with 4 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ elif (major_torch == 2) and (minor_torch < 2):
|
|||
del os.environ["PYTORCH_CUDA_ALLOC_CONF"]
|
||||
pass
|
||||
|
||||
# First check if CUDA is available ie a NVIDIA GPU is seen
|
||||
if not torch.cuda.is_available():
|
||||
raise NotImplementedError("Unsloth: No NVIDIA GPU found? Unsloth currently only supports GPUs!")
|
||||
|
||||
# Fix Xformers performance issues since 0.0.25
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue