From b18b656633e90eefb0164b34fe4767508ceb40fb Mon Sep 17 00:00:00 2001 From: hong <43953930+phlrain@users.noreply.github.com> Date: Sun, 26 Jan 2025 17:19:42 +0800 Subject: [PATCH] remove max inplace grad (#14596) * remove max inplace grad * update --- test_tipc/supplementary/train.py | 1 - tools/eval.py | 1 - tools/train.py | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test_tipc/supplementary/train.py b/test_tipc/supplementary/train.py index 9dfec5ba4a..ece8d5b268 100644 --- a/test_tipc/supplementary/train.py +++ b/test_tipc/supplementary/train.py @@ -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) diff --git a/tools/eval.py b/tools/eval.py index 9af2702293..f5328ffc27 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -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) diff --git a/tools/train.py b/tools/train.py index 7ce0faf03a..0bddc49955 100755 --- a/tools/train.py +++ b/tools/train.py @@ -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( {