From 283afac081b2bff05d3e43b74a08d267b06f6ad0 Mon Sep 17 00:00:00 2001 From: Aniket Rangrej Date: Thu, 10 Oct 2019 23:05:33 +0530 Subject: [PATCH] Fixing tensor not found issue in bitserial operator (#4095) --- topi/python/topi/x86/bitserial_conv2d.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/topi/python/topi/x86/bitserial_conv2d.py b/topi/python/topi/x86/bitserial_conv2d.py index 536386a..97d0dc0 100644 --- a/topi/python/topi/x86/bitserial_conv2d.py +++ b/topi/python/topi/x86/bitserial_conv2d.py @@ -35,9 +35,10 @@ def schedule_bitserial_conv2d(cfg, outs): 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] -- 2.7.4