| 954 | } |
| 955 | |
| 956 | static void PrintOutputInfo(const Runtime* runtime) { |
| 957 | cout << "----- output info -----" << endl; |
| 958 | for (uint32_t i = 0; i < runtime->GetOutputCount(); ++i) { |
| 959 | auto tensor = runtime->GetOutputTensor(i); |
| 960 | cout << "output[" << i << "]:" << endl; |
| 961 | cout << " name: " << tensor->GetName() << endl; |
| 962 | |
| 963 | string dims_str; |
| 964 | auto shape = tensor->GetShape(); |
| 965 | for (uint32_t j = 0; j < shape->GetDimCount(); ++j) { |
| 966 | dims_str += " " + ToString(shape->GetDim(j)); |
| 967 | } |
| 968 | cout << " dim(s):" << dims_str << endl; |
| 969 | |
| 970 | cout << " data type: " << GetDataTypeStr(shape->GetDataType()) << endl; |
| 971 | cout << " data format: " << GetDataFormatStr(shape->GetDataFormat()) << endl; |
| 972 | cout << " byte(s) excluding padding: " << shape->CalcBytesExcludingPadding() << endl; |
| 973 | |
| 974 | datatype_t saved_data_type = shape->GetDataType(); |
| 975 | if (saved_data_type == DATATYPE_FLOAT16) { |
| 976 | saved_data_type = DATATYPE_FLOAT32; |
| 977 | } |
| 978 | cout << " saved data type: " << GetDataTypeStr(saved_data_type) << endl; |
| 979 | } |
| 980 | |
| 981 | cout << "----------------------" << endl; |
| 982 | } |
| 983 | |
| 984 | #ifdef PPLNN_ENABLE_KERNEL_PROFILING |
| 985 | static void PrintProfilingStatistics(const ProfilingStatistics& stat, double run_dur, int32_t run_count) { |
no test coverage detected