Tvm.contrib.graph_runtime.create error

An error occurred when I run the code “tvm.contrib.graph_runtime.create(graph,lib,ctx)” .But when I run it again, it working. Every time I run it for the first time, I get an error.

latest tvm version

windows and cpu

error info:

xxxxx
        module = tvm.contrib.graph_runtime.create(graph,lib,ctx)
File "tvm\python\tvm\contrib\graph_runtime.py", line 64, in create
        return GraphModule(freate(graph_json_str, libmod, *device_type_id))
File "tvm\python\tvm\_ffi_\_ctypes\packed_func.py", line 224, in __call__
        ctypes.byref(ret_val), ctypes.byref(ret_code)) != 0:
OSError: [WinError - 529697949] Windows Error 0xe06d7363

I saw this error (OSError: [WinError - 529697949] Windows Error 0xe06d7363) when I was trying to load a very large model (~600MB) using 32-bit TVM on Windows. Are you using 32-bit TVM or compiling a large model?

I load a very large model…

Then increasing the memory of your machine will likely solve this issue.

I check my machine, the memory is 8G and the usage rate is 80%. And sometimes it works. #-----------------------

When the model is successfully loaded, I see that only 800M of memory was used for this task in the task manager

@ymwangg Do you have any other Suggestions?

If you are using Python, another possible solution is to use C++. In my experience, model deployment using C++ is more memory efficient.