With the following test
def test():
data = relay.var("data", shape=(2, 1, 2, 4), dtype="int8")
w = relay.var("w", shape=(3, 1, 2, 2), dtype="int8")
conv1 = relay.nn.conv2d(data, w, out_dtype="int32", kernel_size=(2, 2))
gt = conv1 >= relay.full(tvm.relay.const(0, "int32"), shape=(2, 3, 1, 3), dtype='int32')
one = relay.full(tvm.relay.const(1, "int32"), shape=(2, 3, 1, 3),
dtype='int32')
two = relay.full(tvm.relay.const(2, "int32"), shape=(2, 3, 1, 3),
dtype='int32')
where = relay.where(gt, one, two)
add = relay.add(conv1, where)
func = add
func = relay.Function(relay.analysis.free_vars(func),
func)
func = run_infer_type(func)
with relay.build_config(opt_level=1):
graph, lib, params = relay.build(func, "llvm", params=None)
Resulting error is
TVMError: Check failed: found_attach || stage_attach.size() == 0: Invalid Schedule, cannot find the producer compute(conv, 0x1e0dad0) along the loop nest specified by compute_at of consumer compute(T_greater_equal, 0x1e14130)
During handling of the above exception, another exception occurred:
TVMError: Check failed: found_attach || stage_attach.size() == 0: Invalid Schedule, cannot find the producer compute(conv, 0x1e0dad0) along the loop nest specified by compute_at of consumer compute(T_greater_equal, 0x1e14130)
The error goes away if I make where operator Opaque