mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 03:26:12 +08:00
[Minor] Simplify duplicative device check for cuda (#24793)
Signed-off-by: Ziliang Peng <ziliangdotme@gmail.com>
This commit is contained in:
parent
15b8fef453
commit
973c9d01da
@ -64,8 +64,7 @@ class CudaPlatformBase(Platform):
|
|||||||
if self.has_device_capability(80):
|
if self.has_device_capability(80):
|
||||||
# Ampere and Hopper or later NVIDIA GPUs.
|
# Ampere and Hopper or later NVIDIA GPUs.
|
||||||
return [torch.bfloat16, torch.float16, torch.float32]
|
return [torch.bfloat16, torch.float16, torch.float32]
|
||||||
elif (not self.has_device_capability(80)
|
if self.has_device_capability(60):
|
||||||
) and self.has_device_capability(60):
|
|
||||||
# Pascal, Volta and Turing NVIDIA GPUs, BF16 is not supported
|
# Pascal, Volta and Turing NVIDIA GPUs, BF16 is not supported
|
||||||
return [torch.float16, torch.float32]
|
return [torch.float16, torch.float32]
|
||||||
# Kepler and Maxwell NVIDIA GPUs, only FP32 is supported,
|
# Kepler and Maxwell NVIDIA GPUs, only FP32 is supported,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user