NVIDIA / NVIDIA/TensorRT

Conversion to int8 with trtexec fails

Open
#2,984 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

I am trying to convert onnx model to int8 with latest TensorRT. I got the following error:

[05/19/2023-14:42:31] [E] Error[2]: Assertion getter(i) != 0 failed. 
[05/19/2023-14:42:33] [E] Error[2]: [weightConvertors.cpp::quantizeBiasCommon::310] Error Code 2: Internal Error (Assertion getter(i) != 0 failed. )
[05/19/2023-14:42:33] [E] Engine could not be created from network
[05/19/2023-14:42:33] [E] Building engine failed
[05/19/2023-14:42:33] [E] Failed to create engine from model or file.
[05/19/2023-14:42:33] [E] Engine set up failed

But there were no errors before this lines. What does it mean?

Environment

TensorRT Version: 8.6.0.12

NVIDIA GPU: NVIDIA GeForce RTX 3080 Ti

NVIDIA Driver Version: 530.30.02

CUDA Version: 12.1

Operating System: Ubuntu 18.04.6 LTS Bionic

Python Version (if applicable): 3.8

PyTorch Version (if applicable): 2.0.1+cu117

Steps To Reproduce

I use trtexec, my command looks like this
trtexec --onnx=/repo/int8-engine.trt/end2end.onnx --calib=calib_data.h5 --int8 --saveEngine=/repo/int8-engine.trt/end2end.trt --staticPlugins=/mmdeploy/buil/lib/libmmdeploy_tensorrt_ops.so --shapes=input:1x3x800x1300 --verbose

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported trtexec command with the provided TensorRT, CUDA, driver, and model settings, then inspect the verbose output around quantizeBiasCommon. The payload names no source file or test; done would require identifying the cause of the int8 engine-build failure and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.