Added log output message to show that Kahan summation is being used

This commit is contained in:
araleza
2025-07-29 10:28:26 +01:00
parent 3f0230a286
commit 648994271e

View File

@@ -393,11 +393,13 @@ def train(args):
# Self check parameter compatibility
if args.optimizer_type != "adafactor":
logger.warning("Kahan summation has been requested, but currently this is only supported by the supplied Adafactor optimizer.")
if not args.full_bf16:
elif not args.full_bf16:
logger.warning("Kahan summation requires --full_bf16")
if args.blockwise_fused_optimizers:
elif args.blockwise_fused_optimizers:
logger.warning("Kahan summation has been requested, but it is incompatible with --blockwise_fused_optimizer. "\
"Perhaps try --fused_backward_pass instead.")
else:
logger.info("Using Kahan summation")
optimizer.use_kahan_summation = args.kahan_summation
# prepare dataloader