forked from huawei/mindspore2022
!15166 modify log format for 310 inference
From: @yuzhenhua666 Reviewed-by: @oacjiewen,@linqingke Signed-off-by: @linqingke
This commit is contained in:
commit
abfe122a86
|
|
@ -143,7 +143,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
average = average/infer_cnt;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
std::string file_name = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream file_stream(file_name.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ int main(int argc, char* argv[]) {
|
|||
average = average / infer_cnt;
|
||||
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
|
||||
std::string file_name = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
average = average / infer_cnt;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
std::string file_name = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream file_stream(file_name.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
average = average / inferCount;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl;
|
||||
std::string fileName = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream fileStream(fileName.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
average = average / inferCount;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl;
|
||||
std::string fileName = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream fileStream(fileName.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
average = average/infer_cnt;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
std::string file_name = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream file_stream(file_name.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
average = average/infer_cnt;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl;
|
||||
std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl;
|
||||
std::string file_name = "./time_Result" + std::string("/test_perform_static.txt");
|
||||
std::ofstream file_stream(file_name.c_str(), std::ios::trunc);
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ std::string ModelProcess::GetCostTimeInfo() {
|
|||
average = average / infer_cnt;
|
||||
|
||||
std::stringstream timeCost;
|
||||
timeCost << "first model latency "<< average << "ms; count " << infer_cnt << std::endl;
|
||||
timeCost << "first model latency "<< average << " ms; count " << infer_cnt << std::endl;
|
||||
|
||||
return timeCost.str();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ std::vector<std::string> SampleProcess::GetModelExecCostTimeInfo() {
|
|||
secondModelAverage = secondModelAverage / infer_cnt;
|
||||
std::stringstream timeCost;
|
||||
timeCost << "second model inference cost average time: "<< secondModelAverage <<
|
||||
"ms of infer_count " << infer_cnt << std::endl;
|
||||
" ms of infer_count " << infer_cnt << std::endl;
|
||||
result.emplace_back(timeCost.str());
|
||||
|
||||
double totalCostTime;
|
||||
|
|
|
|||
Loading…
Reference in New Issue