serve icon indicating copy to clipboard operation
serve copied to clipboard

🚀 Add TensorRT Execution Provider Support in ONNX Runtime Setup

Open yhna940 opened this issue 1 year ago • 0 comments

Description

This PR updates the setup_ort_session function in ts/torch_handler/base_handler.py to include support for the TensorRT execution provider in ONNX Runtime. When the TensorrtExecutionProvider is available, it is prioritized in the providers list to enhance inference performance on NVIDIA GPUs.

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] This change requires a documentation update

Feature/Issue validation/testing

TensorRT Execution Provider

With the TensorRT execution provider, the ONNX Runtime delivers better inferencing performance on the same hardware compared to generic GPU acceleration.

The TensorRT execution provider in the ONNX Runtime makes use of NVIDIA’s TensorRT Deep Learning inferencing engine to accelerate ONNX model in their family of GPUs. Microsoft and NVIDIA worked closely to integrate the TensorRT execution provider with ONNX Runtime.

Checklist:

  • [x] Did you have fun?
  • [ ] Have you added tests that prove your fix is effective or that this feature works?
  • [ ] Has code been commented, particularly in hard-to-understand areas?
  • [ ] Have you made corresponding changes to the documentation?

yhna940 avatar Oct 12 '24 16:10 yhna940