diff --git a/paddle/fluid/inference/tensorrt/engine.cc b/paddle/fluid/inference/tensorrt/engine.cc index 255ef5d6d61945..301136d3533e04 100644 --- a/paddle/fluid/inference/tensorrt/engine.cc +++ b/paddle/fluid/inference/tensorrt/engine.cc @@ -732,7 +732,7 @@ TensorRTEngine::Weight TensorRTEngine::GetTrtWeight( for (int i = 0; i < weight_tensor.numel(); i++) { int32_data[i] = int64_data[i]; } - weight.SetDataType(phi::DataType::FLOAT32); + weight.SetDataType(phi::DataType::INT32); weight.SetValues(int32_data); } else { paddle::framework::TensorCopySync(