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

Description

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’

Environment

TensorRT Version: 8.5.2.2
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?

https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html