Unverified Commit de53e4bf authored by Wang, Yi's avatar Wang, Yi Committed by GitHub
Browse files

with pytorch cpu only version. without --no_cuda, using --bf16 will trigger...

with pytorch cpu only version. without --no_cuda, using --bf16 will trigger error like "Your setup doesn't support bf16/gpu. You need torch>=1.10, using Ampere GPU with cuda>=11.0" (#20445)
parent ca3b652b
......@@ -1086,7 +1086,7 @@ class TrainingArguments:
if self.no_cuda and not is_torch_bf16_cpu_available():
# cpu
raise ValueError("Your setup doesn't support bf16/cpu. You need torch>=1.10")
elif not self.no_cuda and not is_torch_bf16_gpu_available():
elif not self.no_cuda and torch.cuda.is_available() and not is_torch_bf16_gpu_available():
# gpu
raise ValueError(
"Your setup doesn't support bf16/gpu. You need torch>=1.10, using Ampere GPU with cuda>=11.0"
......
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