Skip to content

Commit 6705046

Browse files
committed
optimize code
test=develop
1 parent ffd5a83 commit 6705046

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/paddle/fluid/transpiler/details/distribute_lookuptable_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616

1717

1818
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+
"""
2425
table_name = None
2526

2627
for op in program.global_block().ops:
@@ -31,7 +32,6 @@ def find_distributed_lookup_table(program):
3132
if table_name != op.input("W")[0]:
3233
raise RuntimeError("all distributed lookup_table_ops"
3334
" should have only one table")
34-
distributed_lookup_table_ops.append(op)
3535
else:
3636
if table_name is not None:
3737
assert op.input("W")[0] != table_name

0 commit comments

Comments
 (0)