Skip to content
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

int8 calibration for batch > 1 #29

Open
maidmentdaniel opened this issue Apr 12, 2021 · 3 comments
Open

int8 calibration for batch > 1 #29

maidmentdaniel opened this issue Apr 12, 2021 · 3 comments

Comments

@maidmentdaniel
Copy link

Hi @rmccorm4,
I would like to ask some advice on int8 calibration. I've had no trouble building explicit batch engines where the batch > 1 with fp16 and I've managed to get int8 explicit batch engines built where the batch = 1. However, int8 calibration seems to not work for batch > 1. It calibrates without errors or failures, and my demo app runs without errors so it's getting hard to debug. Do you have any advice? I've tried building the cache with batch = 1 and then using that to build an engine of batch > 1, and it seemed to work but I haven't been able to replicate that particular result.

@rmccorm4
Copy link
Owner

Hi @maidmentdaniel ,

The int8 code in this repo is pretty outdated - I would encourage you to refer to Polygraphy's INT8 sample. The API is very intuitive to use: https://github.com/NVIDIA/TensorRT/blob/master/tools/Polygraphy/examples/api/04_int8_calibration_in_tensorrt/example.py

@maidmentdaniel
Copy link
Author

maidmentdaniel commented Apr 13, 2021

Thanks a lot for the pointer. I'm not quite sure I'm ready to update TensorRT and Cuda yet. Could you point to some info as to how the old API handles dynamic vs static onnx files that would be fantastic.

@rmccorm4
Copy link
Owner

What version are you currently running? Also, the tensorrt NGC containers are a good way of trying different versions without always having to update host dependencies: https://ngc.nvidia.com/containers/nvidia:tensorrt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants