mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
Protect cuda better ?
This commit is contained in:
parent
3494cb0067
commit
fe4ef95d92
@ -29,7 +29,7 @@ if torch.version.hip is not None:
|
||||
empty_cache = torch.cuda.empty_cache
|
||||
synchronize = torch.cuda.synchronize
|
||||
get_free_memory = get_cuda_free_memory
|
||||
elif torch.version.cuda is not None:
|
||||
elif torch.version.cuda is not None and torch.cuda.is_available():
|
||||
SYSTEM = "cuda"
|
||||
empty_cache = torch.cuda.empty_cache
|
||||
synchronize = torch.cuda.synchronize
|
||||
|
Loading…
Reference in New Issue
Block a user