This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Update TOSA transpose_conv2d to match spec
ClosedPublic

Authored by eric-k256 on Jun 8 2022, 12:01 PM.

Details

Summary

The TOSA Specification doesn't have a dilation attribute for transpose_conv2d,
and the padding array is of size 4. (top,bottom,left,right).

This change updates the dialect to match the specification, and updates the lit
tests to match the dialect changes.

Diff Detail

Event Timeline

eric-k256 created this revision.Jun 8 2022, 12:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
eric-k256 requested review of this revision.Jun 8 2022, 12:01 PM
eric-k256 updated this revision to Diff 435379.Jun 8 2022, 4:11 PM

Fix clang-format issue (clang-format 11 vs. clang-format 10 difference)

rsuderman requested changes to this revision.Jun 8 2022, 4:38 PM
rsuderman added inline comments.
mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeTransposeConv.cpp
101

Note you need to update the padding changes below. It is built for having two padding values and its unclear if the existing pad behavior is correct.

This revision now requires changes to proceed.Jun 8 2022, 4:38 PM
eric-k256 updated this revision to Diff 435621.Jun 9 2022, 11:39 AM

Fix padding in the DecomposeTransposeConv passes to be compatible with the new attribute.
Added a testcase to try to catch future problems with padded transpose_conv.

Renamed the pass to TransposeConvNonStridedConverter, as it isn't specific to dilated
convolutions, but a better option than the StridedConverter.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 1 2022, 12:13 PM
This revision was automatically updated to reflect the committed changes.