mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-22 19:23:30 +00:00
Fix build error for CoreML Split op (#19099)
### Description <!-- Describe your changes. --> The `split` input of the Split op is int64_t. Fixing that resolves a type mismatch build error on Windows when CoreML is enabled (for debugging the partitioning code). ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fix build error --------- Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
This commit is contained in:
parent
71657d1eb8
commit
b2ce3eedb9
1 changed files with 2 additions and 2 deletions
|
|
@ -139,8 +139,8 @@ bool SplitOpBuilder::IsOpSupportedImpl(const Node& node, const OpBuilderInputPar
|
|||
}
|
||||
const auto& splits_tensor = *initializers.at(input_defs[1]->Name());
|
||||
Initializer unpacked_tensor(splits_tensor);
|
||||
auto splits_span = unpacked_tensor.DataAsSpan<uint64_t>();
|
||||
int sum_of_splits = std::accumulate(splits_span.begin(), splits_span.end(), 0);
|
||||
auto splits_span = unpacked_tensor.DataAsSpan<int64_t>();
|
||||
int64_t sum_of_splits = std::accumulate(splits_span.begin(), splits_span.end(), int64_t{0});
|
||||
if (sum_of_splits != split_dims_at_axis) {
|
||||
LOGS(logger, VERBOSE) << "Mismatch between the sum of 'split'. Expected: "
|
||||
<< split_dims_at_axis
|
||||
|
|
|
|||
Loading…
Reference in a new issue