Skip to content
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

Fixed a minor bug in layout transformation for Resize #21954

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ Status TransformLayoutForEP(Graph& graph, bool& modified, const IExecutionProvid
for (size_t i = 2; i < node->Inputs().size(); i++) {
auto constant = api_graph->GetConstant(node->Inputs()[i]);
if (constant != nullptr && constant->Data().size() > 0) {
input_perms.push_back(&input_perm);
// Starting from opset version 18, 'scales' and 'sizes' can be 2D tensors.
// However, our current implementation only supports the transposition of 4D tensors.
fdwr marked this conversation as resolved.
Show resolved Hide resolved
if (constant->NumElements() == 4) {
input_perms.push_back(&input_perm);
}
Honry marked this conversation as resolved.
Show resolved Hide resolved
} else {
// TODO: Fix inconsistency. We should Transpose the non-const inputs so that the result of our changes
// is consistent - all layout specific inputs are in NHWC format when we're done.
Expand Down
Loading