[TRT] [E] 6: The engine plan file is generated on an incompatible device, expecting compute 8.6 got compute 8.9, please rebuild

Description

[TRT] [E] 6: The engine plan file is generated on an incompatible device, expecting compute 8.6 got compute 8.9, please rebuild.
Is there a way to solve the problem that TensorRT engine files generated by 30 series GPU cannot be used interchangeably with TensorRT engine files generated by 40 series GPU?

Environment

TensorRT Version: 8.6.1
GPU Type: RTX 30 Series/RTX 40 Series
Nvidia Driver Version: 551.52
CUDA Version: 12.3
CUDNN Version: 8.9.0
Operating System + Version: Windows
Python Version (if applicable): 3.9.5
TensorFlow Version (if applicable):
PyTorch Version (if applicable): 2.1.1
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