diff --git a/paddle/fluid/inference/analysis/ir_passes/tensorrt_subgraph_pass.cc b/paddle/fluid/inference/analysis/ir_passes/tensorrt_subgraph_pass.cc index 3ad64fe53989cdabe0250dfeae2ff69394d0ea01..79876c0f4f8212a6243422abdf0f4f8b2f77b0c3 100644 --- a/paddle/fluid/inference/analysis/ir_passes/tensorrt_subgraph_pass.cc +++ b/paddle/fluid/inference/analysis/ir_passes/tensorrt_subgraph_pass.cc @@ -434,7 +434,7 @@ std::string TensorRtSubgraphPass::CreateTensorRTOp( &max_shape_tensor, &opt_shape_tensor); } else { - int fd = open(shape_range_info_path.c_str(), O_RDONLY | O_CREAT, 0644); + int fd = open(shape_range_info_path.c_str(), O_WRONLY | O_CREAT, 0644); close(fd); } }