This commit is contained in:
游雁 2024-06-13 17:45:33 +08:00
parent 7355e20503
commit d72df6cd2f

View File

@ -30,8 +30,9 @@ def maybe_autocast(dtype=None, use_deepspeed=False):
yield
else:
if dtype == torch.float16 or dtype == torch.bfloat16:
with autocast(enabled=True, dtype=dtype):
yield
yield
# with autocast(enabled=True, dtype=dtype):
# yield
else:
yield