Tensorrt: OOM Error with dynamic shape int8 calibration.

Created on 10 Mar 2020  路  2Comments  路  Source: NVIDIA/TensorRT

Description

OOM error occurs with dynamic shape int8 calibration.

Hello. I have defined 2 networks using TRT python api with dynamic shape input and confirmed that these 2 networks work well with fp16. After that I tried int8 calibration, but OOM happened. Even when I use 1GB workspace, OOM error occured.

The calibrator which I used is Int8EntropyCalibrator2. It seems that building fp32 engine before the main calibration algorithm has no problem. But, right before main calibration algorithm started, OOM errors occured with check maxima ... log.

Because of the company's security issues, it's difficult to share code or weights. Please understand me ... :( .

Environment

TensorRT Version: 7.0.0.11
GPU Type: T4
Nvidia Driver Version: 440.33
CUDA Version: 10.2.89
CUDNN Version: 7.6.5
Operating System + Version: Ubuntu 18.04
Python Version (if applicable): 3.6
Baremetal or Container (if container which image + tag): nvcr.io/nvidia/tensorrt:20.02-py3

Most helpful comment

Hi @dhkim0225 ,

It's likely not your fault or an actual memory constraint - unfortunately there are known issues with INT8 Calibration + Dynamic shapes: https://github.com/NVIDIA/TensorRT/issues/289#issuecomment-576929063

These issues should be fixed in the next release.

FYI there's also a potential workaround mentioned in that thread, but I don't think it will apply to all cases, and it doesn't fix the underlying problems.

If it helps unblock you for now, maybe you can try it out for some proof of concept types of things.

All 2 comments

Hi @dhkim0225 ,

It's likely not your fault or an actual memory constraint - unfortunately there are known issues with INT8 Calibration + Dynamic shapes: https://github.com/NVIDIA/TensorRT/issues/289#issuecomment-576929063

These issues should be fixed in the next release.

FYI there's also a potential workaround mentioned in that thread, but I don't think it will apply to all cases, and it doesn't fix the underlying problems.

If it helps unblock you for now, maybe you can try it out for some proof of concept types of things.

@rmccorm4 Thank you for your fast reply.

Was this page helpful?
0 / 5 - 0 ratings