def func_to_onnx(func, name): mod = tvm.IRModule() mod["main"] = func onnx_model = to_onnx(mod, {}, name, path=None) return onnx_model.SerializeToString()
def func_to_onnx(mod, params, name): onnx_model = to_onnx(mod, params, name, path=None) return onnx_model.SerializeToString()