This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] add conv_1d_ncw_fcw
ClosedPublic

Authored by raikonenfnu on Sep 7 2022, 6:14 PM.

Diff Detail

Event Timeline

raikonenfnu created this revision.Sep 7 2022, 6:14 PM
raikonenfnu requested review of this revision.Sep 7 2022, 6:14 PM
hanchung accepted this revision.Sep 8 2022, 10:43 AM
hanchung added inline comments.
mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
1220–1222

Let's add layout information to the doc, like what we've done for conv_2d_nhwc_hwcf.

Performs 1-D convolution.

Layout:
  * Input: NCW.
  * Kernel: FCW.

Numeric casting is performed on the operands to the inner multiply, promoting
them to the same data type as the accumulator/output.
This revision is now accepted and ready to land.Sep 8 2022, 10:43 AM
antiagainst requested changes to this revision.Sep 8 2022, 10:51 AM
This revision now requires changes to proceed.Sep 8 2022, 10:51 AM

Added layout information

raikonenfnu marked an inline comment as done.Sep 8 2022, 3:24 PM
raikonenfnu added inline comments.
mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
1220–1222

thanks, done :)

hanchung accepted this revision.Sep 8 2022, 3:35 PM

Sorry for some reason my previous comment was not posted..

mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
288

Can we order the domains according to the order they are used in the compute expression? That's the convention we follow for other named ops. Specifically, D.n, D.f, D.ow, D.c, D.kw.

raikonenfnu marked an inline comment as done.

Reordered the layout to follow linalg namedOp convention

raikonenfnu added inline comments.Sep 8 2022, 4:09 PM
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
288

done, thanks for the input!

antiagainst accepted this revision.Sep 8 2022, 4:14 PM
This revision is now accepted and ready to land.Sep 8 2022, 4:14 PM
This revision was automatically updated to reflect the committed changes.