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

[AlterLayout] Strided slice layout transform fix (disallow NCHW4c -> NCHW etc properly) #9245

Merged
merged 2 commits into from
Oct 11, 2021

Conversation

masahi
Copy link
Member

@masahi masahi commented Oct 11, 2021

Fix #8759

Looking at StridedSliceInferCorrectLayout, I believe we do not allow propagating a new layout through strided_slice if the original layout is a packed one such as NCHW4c and the new layout is unpacked one, see

if (!axis.IsPrimal()) {
// original layout that contains splitted axes is not supported
return out_default;
. But #8759 exhibits a case where this check fails to detect NCHW4c -> NCHW case.

cc @vinx13 who wrote this code.

@vinx13 vinx13 merged commit 95cde0c into apache:main Oct 11, 2021
masahi added a commit to Laurawly/tvm-1 that referenced this pull request Oct 14, 2021
…NCHW etc properly) (apache#9245)

* prohibit propagating through packed to unpacked layout

* add test
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
…NCHW etc properly) (apache#9245)

* prohibit propagating through packed to unpacked layout

* add test
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…NCHW etc properly) (apache#9245)

* prohibit propagating through packed to unpacked layout

* add test
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] AlterLayout doesn't correctly wrap strided_slice with layout_transforms
2 participants