|
7 | 7 | #include "torch/script.h" |
8 | 8 |
|
9 | 9 | #include "torch_tensorrt/logging.h" |
10 | | -#include "torch_tensorrt/ptq.h" |
11 | 10 | #include "torch_tensorrt/torch_tensorrt.h" |
12 | 11 |
|
13 | 12 | #include "accuracy.h" |
@@ -335,8 +334,6 @@ int main(int argc, char** argv) { |
335 | 334 | calibration_cache_file_path = torchtrtc::fileio::resolve_path(args::get(calibration_cache_file)); |
336 | 335 | } |
337 | 336 |
|
338 | | - auto calibrator = torchtrt::ptq::make_int8_cache_calibrator(calibration_cache_file_path); |
339 | | - |
340 | 337 | compile_settings.require_full_compilation = require_full_compilation; |
341 | 338 |
|
342 | 339 | if (torch_executed_ops || torch_executed_mods) { |
@@ -367,13 +364,9 @@ int main(int argc, char** argv) { |
367 | 364 | compile_settings.enabled_precisions.insert(torch::kF16); |
368 | 365 | } else if (dtype == torchtrt::DataType::kChar) { |
369 | 366 | compile_settings.enabled_precisions.insert(torch::kI8); |
370 | | - if (calibration_cache_file) { |
371 | | - compile_settings.ptq_calibrator = calibrator; |
372 | | - } else { |
373 | | - torchtrt::logging::log( |
374 | | - torchtrt::logging::Level::kINFO, |
375 | | - "Int8 precision has been enabled but no calibrator provided. This assumes the network has Q/DQ nodes obtained from Quantization aware training. For more details, refer to https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work-with-qat-networks"); |
376 | | - } |
| 367 | + torchtrt::logging::log( |
| 368 | + torchtrt::logging::Level::kDEBUG, |
| 369 | + "Int8 precision has been enabled which assumes the network has Q/DQ nodes obtained"); |
377 | 370 | } else { |
378 | 371 | std::stringstream ss; |
379 | 372 | ss << "Invalid precision given for enabled kernel precision, options are [ float | float32 | f32 | fp32 | half | float16 | f16 | fp16 | char | int8 | i8 ], found: "; |
|
0 commit comments