Hi,
I was having an error appear in a network I am trying to compile with TVM using the ‘c’ target. It happens to be a problem if there is a conv1d layer in the network.
import tvm
from tvm import relay
def min_relay_prog():
x = relay.var('x', shape=(1,3, 224))
w = relay.var('w', shape=(16, 3, 3))
conv2d = relay.op.nn.conv1d(x, w)
rfunc = relay.Function([x,w], conv2d)
mod = tvm.IRModule()
mod["main"] = rfunc
return mod
mod = min_relay_prog()
graph , lfunc, params = relay.build(mod,'c')
Generates the following error
Exception has occurred: TVMError
Traceback (most recent call last):
[bt] (8) /home/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::tir::SeqStmtNode const*)+0x76) [0x7ff04c0c8b16]
[bt] (7) /home/tvm/build/libtvm.so(tvm::tir::StmtFunctor<void (tvm::tir::Stmt const&)>::VisitStmt(tvm::tir::Stmt const&)+0x75) [0x7ff04baa13d5]
[bt] (6) /home/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::tir::ForNode const*)+0x25e) [0x7ff04c0cf12e]
[bt] (5) /home/tvm/build/libtvm.so(tvm::tir::StmtFunctor<void (tvm::tir::Stmt const&)>::VisitStmt(tvm::tir::Stmt const&)+0x75) [0x7ff04baa13d5]
[bt] (4) /home/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::tir::AttrStmtNode const*)+0xd7) [0x7ff04c0d4fb7]
[bt] (3) /home/tvm/build/libtvm.so(tvm::tir::StmtFunctor<void (tvm::tir::Stmt const&)>::VisitStmt(tvm::tir::Stmt const&)+0x75) [0x7ff04baa13d5]
[bt] (2) /home/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::tir::AllocateNode const*)+0x128) [0x7ff04c0cba98]
[bt] (1) /home/tvm/build/libtvm.so(tvm::codegen::CodeGenCHost::PrintType(tvm::runtime::DataType, std::ostream&)+0x1f7) [0x7ff04c0dc027]
[bt] (0) /home/tvm/build/libtvm.so(+0x120f242) [0x7ff04c0db242]
File "/home/tvm/src/target/source/codegen_c_host.cc", line 132
TVMError: Cannot convert type float32x222 to C type
Any ideas?
thanks