[ET-VK] Do not partition batch norm on a non-4d input - #22509
Open
msluszniak wants to merge 1 commit into
Open
Conversation
add_native_batch_norm_node() asserts VK_CHECK_COND(in_sizes.size() == 4, "BatchNorm only support 4d tensor") on both the input and the output sizes, but the partitioner claims the node at any rank. A batch norm on rank-3 activations, which is every conv1d model, lowers cleanly and then aborts at execute time. Decline the node instead so it falls back. Split out of pytorch#22399, which is now scoped to constant_pad_nd.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22509
Note: Links to docs will display an error until the docs builds have been completed.
|
This PR needs a
|
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.
Summary
add_native_batch_norm_node()asserts on both the input and the output sizes:but the partitioner claims
_native_batch_norm_legit_no_trainingat any rank. A batch norm on rank-3 activations, which is every conv1d model, therefore lowers cleanly and aborts at execute time rather than falling back.This declines the node when the input is not 4d, following the existing
_check_copy_is_noop/check_conv_nodeprecedent.Split out of #22399, which is now scoped to
constant_pad_nd.cc @SS-JIA @manuelcandales @digantdesai @cbilgin