Skip to content

Commit 1d36999

Browse files
ziliangpengdsxsteven
authored andcommitted
[Minor] Simplify duplicative device check for cuda (vllm-project#24793)
Signed-off-by: Ziliang Peng <[email protected]>
1 parent 17f8a21 commit 1d36999

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

vllm/platforms/cuda.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ def supported_dtypes(self) -> list[torch.dtype]:
6464
if self.has_device_capability(80):
6565
# Ampere and Hopper or later NVIDIA GPUs.
6666
return [torch.bfloat16, torch.float16, torch.float32]
67-
elif (not self.has_device_capability(80)
68-
) and self.has_device_capability(60):
67+
if self.has_device_capability(60):
6968
# Pascal, Volta and Turing NVIDIA GPUs, BF16 is not supported
7069
return [torch.float16, torch.float32]
7170
# Kepler and Maxwell NVIDIA GPUs, only FP32 is supported,

0 commit comments

Comments
 (0)