-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting Per-Tensor Dynamic Range Using Python cause acc dropped #1165
Comments
Hello @maoxiaoming86 , Is this TRT 7.1? the highlighted conv kernel should run on INT8->FP32 precision. Could you take a try to upgrade to 7.2? thanks! |
My TRT is 7.1. Do you mean that when upgrade to 7.2, the backend of trt run the highlighted conv kernel on INT8->FP32 precision automatically? |
Hello @maoxiaoming86 ,
this highlight conv should run in INT8 -> FP32 precision automaticly. |
I don't have any Q/DQ,before build engine, I remove Q/DQ nodes in onnx, and save input's scale and weight's scale for each conv. When build engine, I first use saved scales to calculate input's amax and output's amax for each conv, then use set_dynamic_range to set amax. By this manner, how to break Conv+Add+Relu |
@maoxiaoming86 could you point out the logs that how tensorRT now fuse the highlight graph? thanks |
Close since no activity for more than 3 weeks, please reopen if you still have question, thanks! |
Description
When I set Per-Tensor Dynamic Range Using Python, the int8-model's acc is very low. The amax is got from pytorch-quantization.
I try to disable some layers not to do int8 inference, and found that disable add layer's input, the acc can be up.
But the speed of new model is going tobe alot slower. And I found that , the log of building engine show that some layers rejectint int8 implementation.
How to solve this problem? Can anyone give me some advice? Thank you
Environment
TensorRT Version:
NVIDIA GPU:
NVIDIA Driver Version:
CUDA Version:
CUDNN Version:
Operating System:
Python Version (if applicable):
Tensorflow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if so, version):
Relevant Files
Steps To Reproduce
The text was updated successfully, but these errors were encountered: