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

Layout convolution as NHWC or NCHW only #3729

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

pfultz2
Copy link
Collaborator

@pfultz2 pfultz2 commented Dec 20, 2024

No description provided.

@pfultz2 pfultz2 requested a review from causten as a code owner December 20, 2024 18:46
@TedThemistokleous TedThemistokleous added the roadmap Tasks to finish for a release label Dec 20, 2024
Copy link
Collaborator

@TedThemistokleous TedThemistokleous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look simple and I get the point here.

I think you need to update auto convolution though


[2024-12-20T21:46:54.569Z] [   RUN    ] auto_conv_nchw

[2024-12-20T21:46:54.569Z] [ COMPLETE ] auto_conv_nchw (33.3551ms)

[2024-12-20T21:46:54.569Z] [   RUN    ] auto_conv_nhwc

[2024-12-20T21:46:54.569Z] void auto_conv_nhwc()

[2024-12-20T21:46:54.569Z] /var/jenkins/workspace/AMDMIGraphX_PR-3729/test/layout_convolution.cpp:90:

[2024-12-20T21:46:54.569Z]     FAILED: m1.sort() == m2.sort() [ @0 = @literal{ ... } -> float_type, {16, 3, 3, 8}, {72, 24, 8, 1}

[2024-12-20T21:46:54.569Z] @1 = transpose[permutation={0, 3, 1, 2}](@0) -> float_type, {16, 8, 3, 3}, {72, 1, 24, 8}

[2024-12-20T21:46:54.569Z] @2 = layout[permutation={0, 1, 2, 3}](@1) -> float_type, {16, 8, 3, 3}, {72, 9, 3, 1}

[2024-12-20T21:46:54.570Z] x = @param:x -> float_type, {1, 16, 16, 8}, {2048, 128, 8, 1}

[2024-12-20T21:46:54.570Z] @4 = transpose[permutation={0, 3, 1, 2}](x) -> float_type, {1, 8, 16, 16}, {2048, 1, 128, 8}

[2024-12-20T21:46:54.570Z] @5 = layout[permutation={0, 1, 2, 3}](@4) -> float_type, {1, 8, 16, 16}, {2048, 256, 16, 1}

[2024-12-20T21:46:54.570Z] @6 = convolution[padding={1, 1},stride={2, 2},dilation={1, 1},group=1,padding_mode=0](@5,@2) -> float_type, {1, 16, 8, 8}, {1024, 64, 8, 1}

[2024-12-20T21:46:54.570Z] @7 = relu(@6) -> float_type, {1, 16, 8, 8}, {1024, 64, 8, 1}

[2024-12-20T21:46:54.570Z] @8 = layout[permutation={0, 2, 3, 1}](@7) -> float_type, {1, 16, 8, 8}, {1024, 1, 128, 16}

[2024-12-20T21:46:54.570Z] @9 = @return(@8)

[2024-12-20T21:46:54.570Z]  == @0 = @literal{ ... } -> float_type, {16, 3, 3, 8}, {72, 24, 8, 1}

[2024-12-20T21:46:54.570Z] @1 = transpose[permutation={0, 3, 1, 2}](@0) -> float_type, {16, 8, 3, 3}, {72, 1, 24, 8}

[2024-12-20T21:46:54.570Z] x = @param:x -> float_type, {1, 16, 16, 8}, {2048, 128, 8, 1}

[2024-12-20T21:46:54.570Z] @3 = transpose[permutation={0, 3, 1, 2}](x) -> float_type, {1, 8, 16, 16}, {2048, 1, 128, 8}

[2024-12-20T21:46:54.570Z] @4 = convolution[padding={1, 1},stride={2, 2},dilation={1, 1},group=1,padding_mode=0](@3,@1) -> float_type, {1, 16, 8, 8}, {1024, 1, 128, 16}

[2024-12-20T21:46:54.570Z] @5 = relu(@4) -> float_type, {1, 16, 8, 8}, {1024, 1, 128, 16}

[2024-12-20T21:46:54.570Z] @6 = @return(@5)

[2024-12-20T21:46:54.570Z]  ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap Tasks to finish for a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants