microsoft / microsoft/onnxruntime
fix error: conversion from gsl::span<const long int> to non-scalar type std::vector<long int> requested
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
diff --git a/onnxruntime/core/providers/acl/tensor/concat.cc b/onnxruntime/core/providers/acl/tensor/concat.cc
index a7489970d..68e2a3be6 100644
--- a/onnxruntime/core/providers/acl/tensor/concat.cc
+++ b/onnxruntime/core/providers/acl/tensor/concat.cc
@@ -32,7 +32,7 @@ Status Concat::Compute(OpKernelContext* ctx) const {
input_tensors.push_back(ctx->Input(i));
}
- std::vector<int64_t> output_dims = input_tensors[0]->Shape().GetDims();
-
std::vector<int64_t> output_dims = input_tensors[0]->Shape().GetDimsAsVector();
// 'Concat' mode
if (!is_stack_) {
diff --git a/onnxruntime/core/providers/armnn/tensor/concat.cc b/onnxruntime/core/providers/armnn/tensor/concat.cc
index e6af286f3..3828a413d 100644
--- a/onnxruntime/core/providers/armnn/tensor/concat.cc
+++ b/onnxruntime/core/providers/armnn/tensor/concat.cc
@@ -39,7 +39,7 @@ Status Concat::Compute(OpKernelContext* ctx) const {
LOGS_DEFAULT(VERBOSE) << "axis: " << axis_;
LOGS_DEFAULT(VERBOSE) << std::endl;
- std::vector<int64_t> output_dims = input_tensors[0]->Shape().GetDims();
-
std::vector<int64_t> output_dims = input_tensors[0]->Shape().GetDimsAsVector();
// 'Concat' mode
if (!is_stack_) {
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing onnxruntime/core/providers/acl/tensor/concat.cc and onnxruntime/core/providers/armnn/tensor/concat.cc, focusing on the output shape conversion shown in the issue. Build or compile the affected ACL and ArmNN providers to confirm the conversion error is resolved; done means both files compile successfully with the corrected shape handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100