Skip to content

[WIP] ORT aborts on ConcatFromSequence with empty sequence inputs #25067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 14, 2025

  • Analyzed the issue: ConcatFromSequence aborts when mixing empty and non-empty tensors with different ranks
  • 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.

Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ORT aborts on ConcatFromSequence with empty sequence inputs
2 participants