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 #20876.
Problem
get_inxconstructsimage_width / target_widthbefore any output coordinates are evaluated. A statically empty output axis therefore raises divide-by-zero while constructing the TE body, even though its iteration domain has no elements to sample. This prevents valid empty half-pixel Resize results from being lowered.Change
When
equal_const_int(target_width, 0)proves that the output axis is empty, use a zero placeholder scale instead of constructing the division. Nonzero and general symbolic extents retain the original expression. Output shape, output dtype, and the existing operator validation paths are unchanged.This targets empty half-pixel output construction. It does not implement sampling from an empty input into a nonempty output or change the separate unit-extent
tf_crop_and_resizebranch.Regression tests
Local validation
git diff --checkpassed.The main TOPI resize Python module was loaded verbatim into an existing local TVM 0.26.dev0 LLVM runtime, with compatibility aliases kept outside the PR. This is not a full current-main rebuild or full-suite result; upstream CI is required.
For a current-main build: