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

How to save the calibration.bin files? #33

Open
xingyueye opened this issue Nov 20, 2021 · 0 comments
Open

How to save the calibration.bin files? #33

xingyueye opened this issue Nov 20, 2021 · 0 comments

Comments

@xingyueye
Copy link

xingyueye commented Nov 20, 2021

Description

Hi, @rmccorm4
Currently, I'm trying to generate INT8 TRT engine with calibrations, like that
calibrator = Calibrator(data_loader=calib_data(), cache="identity-calib.cache") build_engine = EngineFromNetwork( NetworkFromOnnxPath("identity.onnx"), config=CreateConfig(int8=True, calibrator=calibrator) )
But I was really confused about the mechanisms:

  1. when was calibration performed? within the 'EngineFromNetwork' process? I tried to set break-point at calibration::get_batch(), but It did not works;
  2. How to get the calibration.bin files? I have tried to call the function of "write_calibration_cache(self, cache)", But I don't know which 'cache' to pass in.

Please help me with these two problems, Thanks a lot.

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

1 participant