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 8, 2019
1 parent 76c2392 commit 3ea8358
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions topi/python/topi/x86/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ 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.
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 3ea8358

Please sign in to comment.