AttributeError: 'TensorRTBackendRep' object has not attribute 'create_execution_context'


I am trying to create an engine from my onnx model, but when I call ‘context = engine.create_execution_context()’, I get the error:

AttributeError: ‘TensorRTBackendRep’ object has not attribute ‘create_execution_context’


TensorRT Version:
GPU Type: NVIDIA Jetson AGX Xavier
CUDA Version: 11.4 (when I do print(torch.version.cuda) I get none. Is that an issue)
CUDNN Version: CUDNN_MAJOR 8 (when I do print torch.backends.cudnn.version, I also get none)
Operating System + Version: Ubuntu 20.04
Python Version (if applicable): 3.8
TensorFlow Version (if applicable): Dont have tf installed (Not sure if applicable)
PyTorch Version (if applicable): 2.2.1 (Not sure if applicable)

Steps To Reproduce

model_onnx = onnx.load(model_path)
create TensorRT Engine from the ONNX Model
engine = backend.prepare(model_onnx, device=‘CUDA:0’)
create a context for executing inference on the engine
context = engine.create_execution_context()

Hi @muhammad.shamim1 ,
Can you please try verifying CUDA cudnn installation?