Skip to content
Permalink
Browse files

Merge pull request #25771 from trevor-m:tmorris_tftrt_calibrator_trt_5_1

PiperOrigin-RevId: 234747254
  • Loading branch information...
tensorflower-gardener committed Feb 20, 2019
2 parents 18b797f + 3c4a320 commit 8501ea4c417de4ced5d3c3212f01624c76145ba4
Showing with 5 additions and 0 deletions.
  1. +5 −0 tensorflow/compiler/tf2tensorrt/utils/trt_int8_calibrator.h
@@ -34,7 +34,12 @@ namespace tensorrt {
// TRTs pull model for calibration. When TRT implements a means for
// a push calibration This class should be updated accordingly

// IInt8EntropyCalibrator2 is prefferred for TRT 5.1+.
#if NV_TENSORRT_MAJOR > 5 || (NV_TENSORRT_MAJOR == 5 && NV_TENSORRT_MINOR >= 1)
struct TRTInt8Calibrator : public nvinfer1::IInt8EntropyCalibrator2 {
#else
struct TRTInt8Calibrator : public nvinfer1::IInt8EntropyCalibrator {
#endif
public:
// Construct a calibrator for future calibration.
TRTInt8Calibrator(

0 comments on commit 8501ea4

Please sign in to comment.
You can’t perform that action at this time.