Unverified Commit 5e89a435 authored by jeffhataws's avatar jeffhataws Committed by GitHub
Browse files

Revert "Fix --bf16 option support for Neuron after PR #22300" (#22451)

This reverts commit fd81746dbec5f17c8285a0fdc72ca4b4c025cc33.
parent b844f8a9
......@@ -588,12 +588,7 @@ class Trainer:
if args.fp16 or args.bf16:
if args.half_precision_backend == "auto":
if is_torch_neuroncore_available():
if args.fp16:
raise ValueError("Tried to use `fp16` but this option is not yet supported on Neuron.")
else:
args.half_precision_backend = "cpu_amp"
elif args.device == torch.device("cpu"):
if args.device == torch.device("cpu"):
if args.fp16:
raise ValueError("Tried to use `fp16` but it is not supported on cpu")
elif _is_native_cpu_amp_available:
......
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