I cloned the latest master branch . compiled with LLVM6.0. I compiled a mobilenet-based object detection model.
Environment: OS: Ubuntu 16.04 Python: 3.6 XGBoost: 0.81 TVM: latest 79735eb .
Error log:
File “export.py”, line 30, in graph, lib, params = nnvm.compiler.build(nnvm_sym, target, shape_dict, params=nnvm_params) File “/Users/yujinke/downloads/tvm-0.5/nnvm/python/nnvm/compiler/build_module.py”, line 281, in build graph = optimize(graph, shape, dtype, layout) File “/Users/yujinke/downloads/tvm-0.5/nnvm/python/nnvm/compiler/build_module.py”, line 170, in optimize graph = graph.apply([“InferShape”, “InferType”, “AlterOpLayout”]) File “/Users/yujinke/downloads/tvm-0.5/nnvm/python/nnvm/graph.py”, line 234, in apply check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle))) File “/Users/yujinke/downloads/tvm-0.5/nnvm/python/nnvm/_base.py”, line 75, in check_call raise NNVMError(py_str(_LIB.NNGetLastError())) nnvm._base.NNVMError: TVMCall CFunc Error: Traceback (most recent call last): File “/Users/yujinke/downloads/tvm-0.5/python/tvm/_ffi/_ctypes/function.py”, line 55, in cfun rv = local_pyfunc(*pyargs) File “/Users/yujinke/downloads/tvm-0.5/nnvm/python/nnvm/top/nn.py”, line 156, in alter_conv2d_layout return topi.nn.conv2d_alter_layout(attrs, inputs, tinfos) File “”, line 2, in conv2d_alter_layout File “/Users/yujinke/downloads/tvm-0.5/python/tvm/target.py”, line 356, in dispatch_func return dispatch_dict[k](*args, **kwargs) File “/Users/yujinke/downloads/tvm-0.5/topi/python/topi/x86/conv2d.py”, line 319, in _alter_conv2d_layout _get_default_config(cfg, data, kernel, strides, padding, out_dtype, is_depthwise) File “/Users/yujinke/downloads/tvm-0.5/topi/python/topi/x86/conv2d.py”, line 24, in _get_default_config from depthwise_conv2d import _fallback_schedule ModuleNotFoundError: No module named ‘depthwise_conv2d’
My code . but they work well in TVM-0.4
import numpy as np import nnvm.compiler import nnvm.testing import tvm from tvm.contrib import graph_runtime import mxnet as mx from mxnet import ndarray as nd prefix,epoch = “mneti”,0 sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch) image_size = (480, 640) opt_level = 3 shape_dict = {‘data’: (1, 3, *image_size)} target = tvm.target.create(“llvm -mcpu=broadwell”) nnvm_sym, nnvm_params = nnvm.frontend.from_mxnet(sym, arg_params, aux_params) with nnvm.compiler.build_config(opt_level=opt_level): graph, lib, params = nnvm.compiler.build(nnvm_sym, target, shape_dict, params=nnvm_params) lib.export_library(“./deploy_lib.tar”) print(‘lib succeeded’) with open(“deploy_graph.json”, “w”) as fo: fo.write(graph.json()) with open(“deploy_param.params”, “wb”) as fo: fo.write(nnvm.compiler.save_param_dict(params)) self.tvm_model = runtime.create(graph, lib, ctx) self.tvm_model.set_input(**params)