!28321 [MS][LITE][develop] fix benchmark dump and print data

Merge pull request !28321 from sunsuodong/r1.3
This commit is contained in:
i-robot 2021-12-28 13:05:41 +00:00 committed by Gitee
commit 4088c9497a
1 changed files with 3 additions and 1 deletions

View File

@ -449,7 +449,9 @@ int BenchmarkUnifiedApi::RunBenchmark() {
std::cout << "ms_model_.Build failed while running ", model_name.c_str();
return RET_ERROR;
}
if (!flags_->dump_tensor_data_ && !flags_->print_tensor_data_) {
delete[] graph_buf;
}
if (!flags_->resize_dims_.empty()) {
std::vector<std::vector<int64_t>> resize_dims;
(void)std::transform(flags_->resize_dims_.begin(), flags_->resize_dims_.end(), std::back_inserter(resize_dims),