From e703a2edf459bb3d21f7ee646aac7da6567d0f17 Mon Sep 17 00:00:00 2001 From: duanboqiang Date: Fri, 15 Oct 2021 16:07:19 +0800 Subject: [PATCH] fix opt-offload save bug (#36433) --- .../paddle/distributed/fleet/meta_optimizers/sharding/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py b/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py index 447b52ace69..d04a3a53db3 100755 --- a/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py +++ b/python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py @@ -906,7 +906,7 @@ def save_persistables(exe, dirname, main_program, filename=None): "_velocity_0" ] for check in checks: - if var.name.endswith(check): + if var.name.endswith(check) and var.persistable: return True return False -- GitLab