TensorRT trtexec implementation of Resnet50 INT8 precision

Description

Kindly give out the steps to create a general int8 Resnet50 engine and to benchmark it.(Preferabley using trtexec command)

Is it necessary to supply any additional calibration files during the above process when compared to fp32. If necessary can you mention the same.

Environment

TensorRT Version:7.0.11
GPU Type: T4
Nvidia Driver Version:440
CUDA Version: 10.2
CUDNN Version:
Operating System + Version:Ubuntu 18.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Hi @GalibaSashi,
You can convert your model into onnx and then use trtexec command with something like

trtexec --onnx=resnet50.onnx --explicitBatch --workspace=1024 --int8 --calib=resnet50.cache --saveEngine=resnet50.int8.engine

To know details about calibration process, please refer to the below link.

Thanks!

is --calib parameter necessary??

Hi @AakankshaS,
I had tried creating the calibration file … can you help me out by giving out the steps

Hi @GalibaSashi,
Here you can find the detailed example for the same.

Thanks!