From 66c58fa3460da2f573a296169479f79dae1e9e17 Mon Sep 17 00:00:00 2001 From: duanboqiang Date: Thu, 14 Oct 2021 18:38:21 +0800 Subject: [PATCH] optimize-offload support adamw op type (#36432) --- .../fleet/meta_optimizers/sharding/offload_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/distributed/fleet/meta_optimizers/sharding/offload_helper.py b/python/paddle/distributed/fleet/meta_optimizers/sharding/offload_helper.py index bb6af1b319..9c751c5044 100755 --- a/python/paddle/distributed/fleet/meta_optimizers/sharding/offload_helper.py +++ b/python/paddle/distributed/fleet/meta_optimizers/sharding/offload_helper.py @@ -284,7 +284,7 @@ class OffloadHelper(object): break vars_name = [] - if op.type == "adam": + if op.type == "adam" or op.type == "adamw": # {Moment1Out = [''], Moment2Out = [''], ParamOut = ['']} = # adam(inputs={Moment1 = [''], Moment2 = [''], Param = ['']}) vars_name.append(op.desc.input("Moment1")[0]) -- GitLab