File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
python/paddle/fluid/transpiler/details Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 16
16
17
17
18
18
def find_distributed_lookup_table (program ):
19
- # process lookup_table_op
20
- # 1. check all lookup_table_op is distributed
21
- # 2. check all lookup_table_op share the same table.
22
- distributed_lookup_table_ops = []
23
- # support only one distributed_lookup_table now
19
+ """
20
+ Find distribute lookup table in program.
21
+ We only support one distribute table now.
22
+ :param program:
23
+ :return: table_name or None
24
+ """
24
25
table_name = None
25
26
26
27
for op in program .global_block ().ops :
@@ -31,7 +32,6 @@ def find_distributed_lookup_table(program):
31
32
if table_name != op .input ("W" )[0 ]:
32
33
raise RuntimeError ("all distributed lookup_table_ops"
33
34
" should have only one table" )
34
- distributed_lookup_table_ops .append (op )
35
35
else :
36
36
if table_name is not None :
37
37
assert op .input ("W" )[0 ] != table_name
You can’t perform that action at this time.
0 commit comments