remove max inplace grad (#14596)

* remove max inplace grad

* update
This commit is contained in:
hong 2025-01-26 17:19:42 +08:00 committed by GitHub
parent cf03afb10a
commit b18b656633
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 5 deletions

View File

@ -66,7 +66,6 @@ def amp_scaler(config):
if "AMP" in config and config["AMP"]["use_amp"] is True:
AMP_RELATED_FLAGS_SETTING = {
"FLAGS_cudnn_batchnorm_spatial_persistent": 1,
"FLAGS_max_inplace_grad_add": 8,
}
paddle.set_flags(AMP_RELATED_FLAGS_SETTING)
scale_loss = config["AMP"].get("scale_loss", 1.0)

View File

@ -131,7 +131,6 @@ def main():
if use_amp:
AMP_RELATED_FLAGS_SETTING = {
"FLAGS_cudnn_batchnorm_spatial_persistent": 1,
"FLAGS_max_inplace_grad_add": 8,
}
paddle.set_flags(AMP_RELATED_FLAGS_SETTING)
scale_loss = config["Global"].get("scale_loss", 1.0)

View File

@ -181,9 +181,7 @@ def main(config, device, logger, vdl_writer, seed):
except:
pass
if use_amp:
AMP_RELATED_FLAGS_SETTING = {
"FLAGS_max_inplace_grad_add": 8,
}
AMP_RELATED_FLAGS_SETTING = {}
if paddle.is_compiled_with_cuda():
AMP_RELATED_FLAGS_SETTING.update(
{