mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Fix type cast build error (#23423)
### Description - Fix a type cast in https://github.com/microsoft/onnxruntime/pull/23363. - Include some headers which are suggested by code scanning in that PR. ### Motivation and Context PostMerge has build error: ``` onnxruntime\core\framework\print_tensor_statistics_utils.h(92,55): error C2220: the following warning is treated as an error [D:\a\_work\1\b\Debug\onnxruntime_framework.vcxproj] ```
This commit is contained in:
parent
a05203b91c
commit
97812e5818
3 changed files with 6 additions and 2 deletions
|
|
@ -8,7 +8,10 @@
|
|||
#include "core/framework/print_tensor_statistics_utils.h"
|
||||
#include <iomanip>
|
||||
#include <cctype>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#ifdef DEBUG_NODE_INPUTS_OUTPUTS_ENABLE_DUMP_TO_SQLDB
|
||||
#include <sqlite3.h>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "core/framework/session_state.h"
|
||||
#include "core/graph/graph.h"
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ void PrintCommonStats(const T* data, size_t count, TensorStatisticsData& tensor_
|
|||
// Statistics for float and double only for now.
|
||||
if constexpr (std::is_same<T, float>::value) {
|
||||
tensor_statistics.is_float = true;
|
||||
tensor_statistics.float_min = static_cast<double>(min);
|
||||
tensor_statistics.float_max = static_cast<double>(max);
|
||||
tensor_statistics.float_min = static_cast<float>(min);
|
||||
tensor_statistics.float_max = static_cast<float>(max);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue