Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20889.
Problem
Concat currently classifies every 1-D INT64 constant as shape-like before reaching its tensor constant-folding branch. Consequently,
Concat(Constant([1]), Constant([2]))returns aShapeExpr, and its ordinary tensorAddconsumer fails withNode add_data cannot handle ShapeExpr inputs.Change
Move the existing tensor constant-folding path before shape specialization. Concatenating actual constants now returns a tensor constant regardless of its dtype. Mixed symbolic ShapeExpr/constant construction and the existing parameter-resolution path remain unchanged.
This is deliberately scoped to actual constant operands (including initializers when
keep_params_in_input=False). It does not redefine the existing shape specialization of all-INT64 parameter Vars retained underkeep_params_in_input=True.Regression coverage
Local validation
git diff --checkpassed.Validation used the main Concat class loaded verbatim into an existing local TVM 0.26.dev0 LLVM runtime, with compatibility aliases kept outside this PR. This is not a full rebuild or full-suite result for current main; upstream CI is still required.
Test command for a current-main build: