Skip to content

[Bug][Fix] Handle concatenation of 1D empty tensors with higher-dimensional tensors - #20762

Open
Netra-Srinivasan-McW wants to merge 1 commit into
apache:mainfrom
Netra-Srinivasan-McW:concat-empty-tensor-fix
Open

Netra-Srinivasan-McW wants to merge 1 commit into
apache:mainfrom
Netra-Srinivasan-McW:concat-empty-tensor-fix

Conversation

@Netra-Srinivasan-McW

@Netra-Srinivasan-McW Netra-Srinivasan-McW commented Oct 16, 2026 •

Copy link
Copy Markdown

Issue

PyTorch supports concatenating a 1D empty tensor (shape (0,)) with a higher-dimensional tensor. On the other hand, TVM Relax raises an error when the input tensors have different numbers of dimensions.
This issue occurs in models such as Perplexity AI's pplx-embed-v2-late-9b, where the KV cache is initially represented as a 1D empty tensor. Concatenating it with higher-dimensional key/value tensors causes the Relax frontend conversion to fail.

Solution

This PR updates the Relax frontend to handle concatenation of a 1D empty tensor with a higher-dimensional tensor, enabling model execution to proceed without this error.

Closes #20761.

This branch has not been deployed

No deployments
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.

[Bug] [Relax] Support concatenation of empty 1D tensors with higher-rank tensors

1 participant