mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
[TRT] fix tensorrt serialize file problem (#274)
fix tensorrt serialize file problem
This commit is contained in:
@@ -489,7 +489,7 @@ bool TrtBackend::BuildTrtEngine() {
|
||||
if (option_.serialize_file != "") {
|
||||
FDINFO << "Serialize TensorRTEngine to local file "
|
||||
<< option_.serialize_file << "." << std::endl;
|
||||
std::ofstream engine_file(option_.serialize_file.c_str());
|
||||
std::ofstream engine_file(option_.serialize_file.c_str(), std::ios::binary | std::ios::out);
|
||||
if (!engine_file) {
|
||||
FDERROR << "Failed to open " << option_.serialize_file << " to write."
|
||||
<< std::endl;
|
||||
|
Reference in New Issue
Block a user