From b1334259158cee17997341b75bfb6668e02533bf Mon Sep 17 00:00:00 2001
From: Xi Chen <putcncx@gmail.com>
Date: Thu, 26 Apr 2018 15:28:21 -0700
Subject: [PATCH] add grad_to_block_id

---
 python/paddle/fluid/distribute_transpiler.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/paddle/fluid/distribute_transpiler.py b/python/paddle/fluid/distribute_transpiler.py
index d17475cd28..44542749f8 100644
--- a/python/paddle/fluid/distribute_transpiler.py
+++ b/python/paddle/fluid/distribute_transpiler.py
@@ -444,7 +444,8 @@ class DistributeTranspiler:
             opt_state_block = pserver_program.create_block(
                 pserver_program.num_blocks - 1)
             for glb_op in global_ops:
-                __append_optimize_op__(glb_op, opt_state_block)
+                __append_optimize_op__(glb_op, opt_state_block,
+                                       grad_to_block_id)
 
         # NOT USED: single block version:
         #
-- 
GitLab