This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add depthwise_conv_2d_input_nhwc_filter_hwcf to Linalg TC ops.
ClosedPublic

Authored by hanchung on Mar 2 2021, 1:06 PM.

Details

Summary

Different from the definition in Tensorflow and TOSA, the output is [N,H,W,C,M]. This can make transforms easier in LinAlg because the indexing maps are plain. E.g., to determine if the fill op has dependency between the depthwise conv op, the current pipeline only recognizes the dep if they are all projected affine map.

Diff Detail

Event Timeline

hanchung created this revision.Mar 2 2021, 1:06 PM
hanchung requested review of this revision.Mar 2 2021, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2021, 1:06 PM
hanchung updated this revision to Diff 327852.Mar 3 2021, 10:40 AM

Redefine the depthwise conv op which returns a 5-D output.

hanchung edited the summary of this revision. (Show Details)Mar 3 2021, 10:44 AM
asaadaldien accepted this revision.Mar 3 2021, 11:02 AM

LGTM for depthwise op_def. the ods changes aren't needed for this change, right ? if yes feel free to split and submit the op_def part.

mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc
187

Nice! now there is no need for depth_multiplier attribute

This revision is now accepted and ready to land.Mar 3 2021, 11:02 AM
hanchung updated this revision to Diff 327856.Mar 3 2021, 11:03 AM

Fix tests

hanchung updated this revision to Diff 327862.Mar 3 2021, 11:23 AM

split patches because scalar attribute is not needed in the same patch

LGTM for depthwise op_def. the ods changes aren't needed for this change, right ? if yes feel free to split and submit the op_def part.

Good catch! Yes, they are no longer needed. I split them out.

hanchung edited the summary of this revision. (Show Details)Mar 3 2021, 11:25 AM
This revision was landed with ongoing or failed builds.Mar 3 2021, 11:47 AM
This revision was automatically updated to reflect the committed changes.