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

[Frontend][Paddle] Fix op in paddle did't transmit layout information #12658

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

blackkker
Copy link
Contributor

Related to #12645.
I noticed that in the front-end conversion of paddle, all operators do not pass data_format information.
I want to know whether data_format needs to be passed, or the operators in the paddle model are all set according to the default layout of the python/tvm/relay/op/nn/nn.py? And the author of #12645 should not diy the layout ?
Please let me know if anything is wrong.

@blackkker
Copy link
Contributor Author

@jiangjiajun

@blackkker
Copy link
Contributor Author

So, any thoughts on my question? @jiangjiajun

@jiangjiajun
Copy link
Contributor

jiangjiajun commented Aug 31, 2022

@blackkker Thanks for fixing the data format problem, but I think this only work for operator pool2d, actually there are lots operator like conv2d, batch_norm also exist data format problem.

However, the data format NHWC is not encouraged in PaddlePaddle framework, so I didn't consider the attribute in the Paddle frontend in TVM before.

Anyway, this need to be fixed or assert in the frontend, I will send another pull request to handle NHWC for all the remaining operators.

@blackkker
Copy link
Contributor Author

blackkker commented Aug 31, 2022

Glad to get your reply, if the paddle framework discourages the use of NHWC, then some fixed or assert need to be added. Also may be an instruction to be added to warn user not to do it too.

@vinx13 vinx13 merged commit b21bf66 into apache:main Sep 9, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…apache#12658)

[Frontend][Paddle] Fix adaptive_avg_pool2d in paddle did't transmit layout information
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.

3 participants