I am trying to run the following simple code segment:
import tvm import topi import numpy as np data = tvm.placeholder((1, 3, 224, 224)) kernel = tvm.placeholder((10, 3, 5, 5)) target = "llvm" with tvm.target.create(target): C = topi.nn.conv2d(data, kernel, strides=1, padding=2, dilation=1) S = topi.generic.nn.schedule_conv2d_nchw(C) tvm_IR = tvm.lower(S, [data, kernel], name="test_add1") tvm_module = tvm.build_module(tvm_IR, target)
but I keep getting the following error:
File “tvm/topi/python/topi/x86/conv2d.py”, line 188, in
s = tvm.create_schedule([x.op for x in outs])
AttributeError: ‘TensorSlice’ object has no attribute ‘op’
Any ideas what is wrong ? I am basically trying to run a slightly modified example from:
but on a different backend. LLVM rather then cuda. From what I understand the LLVM will default to to the native cpu as backend. Am I missing something here ?