onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[WIP] ORT aborts on ConcatFromSequence with empty sequence inputs

Open Copilot opened this issue 8 months ago • 0 comments

  • [x] Analyzed the issue: ConcatFromSequence aborts when mixing empty and non-empty tensors with different ranks
  • [x] Identified the root cause: validation loop in PrepareForCompute() only checks tensors after the reference tensor, missing validation for tensors before the reference
  • [ ] Create test case to reproduce the specific issue (mixing empty and non-empty tensors with different ranks)
  • [ ] Fix the validation logic to check ALL tensors against the reference tensor
  • [ ] Verify the fix works and doesn't break existing functionality
  • [ ] Run existing tests to ensure no regressions

Root cause: In concat.cc PrepareForCompute(), when finding the first non-empty tensor as reference, the validation loop starts from reference_tensor_index + 1, which skips validating empty tensors that appear before the reference tensor. This allows incompatible tensor ranks to pass validation, causing aborts later during computation.

Fixes #16619.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Jun 14 '25 16:06 Copilot