Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketmaurya committed Jun 15, 2024
1 parent a0086f1 commit 8ff1dcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/litserve/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def _auto_device_count(self, accelerator) -> int:

@staticmethod
def _choose_gpu_accelerator_backend():
if check_cuda_with_nvidia_smi() > 0:
return "cuda"

try:
import torch

Expand All @@ -80,9 +83,6 @@ def _choose_gpu_accelerator_backend():
except ImportError:
return None

if check_cuda_with_nvidia_smi() > 0:
return "cuda"

return None


Expand Down

0 comments on commit 8ff1dcd

Please sign in to comment.