Unverified Commit 973c9d01 authored by Victor Ziliang Peng's avatar Victor Ziliang Peng Committed by GitHub
Browse files

[Minor] Simplify duplicative device check for cuda (#24793)


Signed-off-by: default avatarZiliang Peng <ziliangdotme@gmail.com>
parent 15b8fef4
......@@ -64,8 +64,7 @@ class CudaPlatformBase(Platform):
if self.has_device_capability(80):
# Ampere and Hopper or later NVIDIA GPUs.
return [torch.bfloat16, torch.float16, torch.float32]
elif (not self.has_device_capability(80)
) and self.has_device_capability(60):
if self.has_device_capability(60):
# Pascal, Volta and Turing NVIDIA GPUs, BF16 is not supported
return [torch.float16, torch.float32]
# Kepler and Maxwell NVIDIA GPUs, only FP32 is supported,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment