Skip to content

Commit

Permalink
cherry-pick : fix trt int8 calib precision bug. test=develop (PaddleP…
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZlX committed Mar 18, 2020
1 parent 2a792de commit 47c5a74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/fluid/inference/tensorrt/trt_int8_calibrator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ TRTInt8Calibrator::TRTInt8Calibrator(
temp_tensor.Resize(data_shape);
data_tensors_.push_back(temp_tensor);
data_buffers_[input_name] = std::pair<void*, size_t>(
static_cast<void*>(temp_tensor.mutable_data<int16_t>(place)), num_ele);
static_cast<void*>(temp_tensor.mutable_data<int16_t>(place)),
data_size);
i += 1;
}
}
Expand Down

0 comments on commit 47c5a74

Please sign in to comment.