Skip to content

Conversation

@mbrookhart
Copy link
Contributor

cc @masahi @csullivan

Currently supports conv1d/2d/3d. I can probably do the same thing for conv transpose and pooling, but this is getting a little long, what do you guys think?

Copy link
Contributor

@csullivan csullivan left a comment

Choose a reason for hiding this comment

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

Thanks @mbrookhart!
Support for other operators that handle would be a nice follow on, but this handles the majority of problematic cases of padding happening explicitly from ONNX's use of auto_pad. On deeplabv3-mobilenetv2 this reduces the number of explicit nn.pad calls from 54 -> 11. Those remaining are part of a space to depth transformation.

@masahi masahi self-assigned this Feb 25, 2021
Copy link
Contributor

@csullivan csullivan left a comment

Choose a reason for hiding this comment

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

Wonderful! Thanks @mbrookhart

@csullivan
Copy link
Contributor

Note that given the layout inference of the implementation, users should consider running SimplifyExpr prior to layout transformations via ConvertLayout or otherwise. Else it may be the case that a layout_transform will block the fusion.

@masahi masahi merged commit 633ee11 into apache:main Mar 2, 2021
@masahi
Copy link
Member

masahi commented Mar 2, 2021

Thanks @mbrookhart @csullivan

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
* fuse constant padding into conv kernels

* change the kernel to support other layouts

* add channel-last test

* add a comment about bailing early
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
* fuse constant padding into conv kernels

* change the kernel to support other layouts

* add channel-last test

* add a comment about bailing early
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