Hello,
I am tring to test the resnet50 inference use tvm relay automatic quantization. now , the quantize pass is OK. but ,when i run() over cpu encounter error.
Model
Resnet50.pb
with relay.quantize.qconfig(calibrate_mode="kl_divergence", weight_scale="max"):
mod = relay.quantize.quantize(mod, params, dataset=calibrate_dataset())
graph, lib, params = relay.build(mod,"llvm"params=params)
m = graph_executor.create(graph, lib, device=tvm.cpu(0))
m.run()
An error occurred during the execut the " fused_fixed_point_multiply" op
File "/tvm/python/tvm/contrib/graph_executor.py", line 248, in run
self._run()
File "/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
12: TVMFuncCall
at /tvm/src/runtime/c_runtime_api.cc:486
11: tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
at /tvm/include/tvm/runtime/packed_func.h:1150
10: std::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
at /usr/include/c++/5/functional:2267
9: _M_invoke
at /usr/include/c++/5/functional:1871
8: operator()
at /tvm/src/runtime/graph_executor/graph_executor.cc:575
7: tvm::runtime::GraphExecutor::Run()
at /tvm/src/runtime/graph_executor/graph_executor.cc:68
6: std::function<void ()>::operator()() const
at /usr/include/c++/5/functional:2267
5: _M_invoke
at /usr/include/c++/5/functional:1871
4: operator()
at /tvm/src/runtime/graph_executor/graph_executor.cc:508
3: tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
at /tvm/include/tvm/runtime/packed_func.h:1150
2: std::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
at /usr/include/c++/5/functional:2267
1: _M_invoke
at /usr/include/c++/5/functional:1871
0: operator()
at /tvm/src/runtime/library_module.cc:78
File "/tvm/src/runtime/library_module.cc", line 78
Check failed: ret == 0 (-1 vs. 0) : Assert fail: (((tir.tvm_struct_get(arg1, 0, 5) == (uint8)0) && (tir.tvm_struct_get(arg1, 0, 6) == (uint8)32)) && (tir.tvm_struct_get(arg1, 0, 7) == (uint16)1)), arg1.dtype is expected to be int32
Any help is greatly appreciated.
Thanks!