It looks like the sample allocate 1G workspace but it is not available on the Jetson Nano.
Please update workspace size into 256Mb. We have verified it can work correctly on the Nano.
diff --git a/onnx_to_tensorrt.py b/onnx_to_tensorrt.py
index 354edfe..d703450 100644
--- a/onnx_to_tensorrt.py
+++ b/onnx_to_tensorrt.py
@@ -98,7 +98,7 @@ def get_engine(onnx_file_path, engine_file_path=""):
def build_engine():
"""Takes an ONNX file and creates a TensorRT engine to run inference with"""
with trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network, trt.OnnxParser(network, TRT_LOGGER) as parser:
- builder.max_workspace_size = 1 << 30 # 1GB
+ builder.max_workspace_size = 1 << 28 # 256MB
builder.max_batch_size = 1
# Parse model file
if not os.path.exists(onnx_file_path):
Hi, I have the same problems, but do not find a way zu remove onnx completely and to install onnx == 1.4.1.
adves@adves-jetson-nano:~$ python2 -m pip freeze | grep onnx
onnx==1.5.0
adves@adves-jetson-nano:~$ pip3 uninstall onnx
WARNING: Skipping onnx as it is not installed.
adves@adves-jetson-nano:~$ pip uninstall onnx
WARNING: Skipping onnx as it is not installed.
as per When installing in a non-Anaconda environment, make sure to install the Protobuf compiler before running the pip installation of onnx. For example, on Ubuntu https://github.com/onnx/onnx