Skip to content

Commit

Permalink
fix a bug in GetTrtWeight (PaddlePaddle#48993)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutianzi666 authored Dec 12, 2022
1 parent 3bdfe12 commit e887f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/fluid/inference/tensorrt/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e887f93

Please sign in to comment.