Skip to content

Commit

Permalink
[TOPI][X86] Pool operator parallel support.
Browse files Browse the repository at this point in the history
  • Loading branch information
anijain2305 committed Oct 9, 2019
1 parent 76c2392 commit 46eaa93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions topi/python/topi/x86/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ def traverse(OP):
traverse(tensor.op)
# schedule pool
elif OP.tag.startswith('pool'):
# Average pool accumulation and division happens in different for loops (#3607).
# To ensure good parallel support, apply multi-threading on the second loop.
if OP != outs[0].op:
output = outs[0]
output_fused = s[output].fuse(output.op.axis[0], output.op.axis[1])
s[output].parallel(output_fused)

PaddedInput = OP.input_tensors[0]
Pool = OP.output(0)
_schedule(PaddedInput, Pool)
Expand Down

0 comments on commit 46eaa93

Please sign in to comment.