Skip to content

Commit

Permalink
Fixing tensor not found issue in bitserial operator (apache#4095)
Browse files Browse the repository at this point in the history
  • Loading branch information
arangrej authored and Animesh Jain committed Oct 17, 2019
1 parent dc2548b commit 1917b7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions topi/python/topi/x86/bitserial_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def traverse(op):
if tag.is_broadcast(op.tag) or 'elemwise' in op.tag:
if op not in s.outputs:
s[op].compute_inline()
for tensor in op.input_tensors and tensor.op not in scheduled_ops:
if isinstance(tensor.op, tvm.tensor.ComputeOp):
traverse(tensor.op)
for tensor in op.input_tensors:
if tensor.op.input_tensors and (tensor.op not in scheduled_ops):
if isinstance(tensor.op, tvm.tensor.ComputeOp):
traverse(tensor.op)

elif 'spatial_bitserial_conv_nchw' in op.tag or 'spatial_bitserial_conv_nhwc' in op.tag:
conv_out = op.input_tensors[0]
Expand Down

0 comments on commit 1917b7d

Please sign in to comment.