Description
Hi,
I’m trying to run Resnet50 inference model using this jupyter notebook
TensorRT/1. Introduction.ipynb at master · NVIDIA/TensorRT · GitHub
I’m running this on a tensorrt container downloaded from ngc
TensorRT | NVIDIA NGC
I get the following error on this line in notebook
trt_model = ONNXClassifierWrapper(“resnet_engine_intro.trt”, [BATCH_SIZE, 1000], target_dtype = PRECISION)
On further investigation this line in onnx_helper.py is generating the stack trace:
engine = runtime.deserialize_cuda_engine(f.read())
The function returns None. How can I debug it more?
AttributeError Traceback (most recent call last)
in
6
----> 7 trt_model = ONNXClassifierWrapper(“resnet_engine_intro.trt”, [BATCH_SIZE, 1000], target_dtype = PRECISION)
/mnt/TensorRT/quickstart/IntroNotebooks/onnx_helper.py in init(self, file, num_classes, target_dtype)
29 self.target_dtype = target_dtype
30 self.num_classes = num_classes
—> 31 self.load(file)
32
33 self.stream = None
/mnt/TensorRT/quickstart/IntroNotebooks/onnx_helper.py in load(self, file)
41 engine = runtime.deserialize_cuda_engine(f.read())
42 print(engine)
—> 43 self.context = engine.create_execution_context()
44
45 def allocate_memory(self, batch):
AttributeError: ‘NoneType’ object has no attribute ‘create_execution_context’
Environment
TensorRT Version: nvidia-tensorrt 7.2.3.4 tensorrt 7.2.2.3
GPU Type: NVIDIA A100-40GB
Nvidia Driver Version: 460.39
CUDA Version: 11.2
CUDNN Version:
Operating System + Version: Docker container, Linux 5.8.0-44
Python Version (if applicable): 3.8.5
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):
Relevant Files
Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)
Steps To Reproduce
Please include:
- Exact steps/commands to build your repro
- Exact steps/commands to run your repro
- Full traceback of errors encountered