Crash when executing tvm::runtime::Registry::Get("tvm.graph_runtime.create")

I’m trying to run my own model by C++. But my program crashed when executing this line: "tvm::runtime::Module mod = (*tvm::runtime::Registry::Get(“tvm.graph_runtime.create”)) (json_data, mod_dylib, device_type, device_id);

The shared lib, json file and params has been tested in python tobe corrected. Dont know why it crashed here. The args used are listed below:

tvm::runtime::Module mod_dylib = tvm::runtime::Module::LoadFromFile(“xxx.dylib”);

std::ifstream json_in(“xxx.json” );

std::string json_data((std::istreambuf_iterator(json_in)), std::istreambuf_iterator());

int device_type = kDLCPU; int device_id = 0;

1 Like

Try tvm.graph_executor.create. Recently We renamed graph_runtime to graph_executor.

4 Likes