"docs/source/vscode:/vscode.git/clone" did not exist on "ea46e3fa9c0fce752bdf6e73c9e0f10a8d04ae37"
Unverified Commit d35f7296 authored by Yanming W's avatar Yanming W Committed by GitHub
Browse files

Restore fp16 support on xla gpu device (#22300)

parent 67c2dbdb
......@@ -598,7 +598,7 @@ class Trainer:
logger.info(f"Using {args.half_precision_backend} half precision backend")
self.do_grad_scaling = False
if (args.fp16 or args.bf16) and not (args.deepspeed or is_sagemaker_mp_enabled() or is_torch_tpu_available()):
if (args.fp16 or args.bf16) and not (args.deepspeed or is_sagemaker_mp_enabled()):
# deepspeed and SageMaker Model Parallel manage their own half precision
if args.half_precision_backend == "cuda_amp":
self.use_cuda_amp = True
......
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