Before this mistake,I find other mistakes.
Traceback (most recent call last):
......
File "/tvm/python/tvm/relay/expr_functor.py", line 45, in visit
res = self.visit_call(expr)
........
File "/tvm/python/tvm/relay/memory_alloc.py", line 31, in is_primitive
return hasattr(call.op, 'attrs') and hasattr(call.op.attrs, 'Primitive') and \
File "/tvm/python/tvm/runtime/object.py", line 53, in __getattr__
return _api_internal._NodeGetAttr(self, name)
File "/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 213, in __call__
raise get_last_ffi_error()
[bt](3) tvm/build/libtvm.so(std::_Function_handler<vioid (tvm::runtime::TVMArgs, tvm runtime....)
[bt](2) tvm/build/libtvm.so(tvm::NodeGetAttr(tvm::runtime::TVMArgs&&,...))
[bt](1) tvm/build/libtvm.so(tvm::ReflectionTable::GetAttr(tvm::runtime::object*,...))
[bt](0) tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal())
AttributeError: relay.op object has no attributed attrs
It comes from this block of tvm/python/tvm/relay/memory_alloc.py:
def is_primitive(call):
return hasattr(call.op, 'attrs') and hasattr(call.op.attrs, 'Primitive') and \
int(call.op.attrs.Primitive) == 1
If not ‘attrs’ ,should return False instead of error. Why not?