This is an archive of the discontinued LLVM Phabricator instance.

Add support for having parallel dimension *after* reduction dimension in split reduction
ClosedPublic

Authored by vmurali on Sep 27 2022, 2:12 PM.

Details

Summary

Previously, splitReduction transformation added the split parallel dimension *before* the reduction dimension, leading to tiling for reduction. This commit creates an option to create the parallel dimension *after* the reduction dimension, allowing us to transform the op into vertical reduction with SIMD parallelism.

Diff Detail

Event Timeline

vmurali created this revision.Sep 27 2022, 2:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2022, 2:12 PM
vmurali requested review of this revision.Sep 27 2022, 2:12 PM
vmurali edited the summary of this revision. (Show Details)Sep 27 2022, 2:13 PM
vmurali updated this revision to Diff 463432.Sep 27 2022, 11:37 PM
vmurali removed a project: Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2022, 11:37 PM
vmurali updated this revision to Diff 463645.Sep 28 2022, 12:12 PM

Fixed a bug - was earlier conflating control.index with reductionDimension.

ThomasRaoux accepted this revision.Sep 28 2022, 12:18 PM

Looks good to me. Please address the couple style nits.

mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
1366–1377

nit: comments should end with a period here and below.

1368–1373

nit: could you move the comments above the associated members to match the style in the rest of the code.

This revision is now accepted and ready to land.Sep 28 2022, 12:18 PM
dcaballe accepted this revision.Sep 28 2022, 12:53 PM

LGTM, thanks!

mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
468

nit: formatting.

mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
1005

nit: Add comment with /*innerParallel=*/false

vmurali updated this revision to Diff 463664.Sep 28 2022, 1:24 PM

Addressed the nit issues.

vmurali marked 3 inline comments as done.Sep 28 2022, 1:25 PM
vmurali updated this revision to Diff 463670.Sep 28 2022, 1:30 PM

Added a period

vmurali marked an inline comment as done.Sep 28 2022, 1:30 PM