This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Clarify (test-scf-)parallel-loop-collapsing
ClosedPublic

Authored by tpopp on Apr 4 2023, 2:42 AM.

Details

Summary
  1. parallel-loop-collapsing is renamed to test-scf-parallel-loop-collapsing.
  2. The pass adds various checks to provide error messages instead of hitting assert failures.
  3. Testing is added to verify these error messages

This is roughly an NFC. The name changes, but all checked behavior
previously would have resulted in an assertion failure. Almost no new
support is added, so this pass is still limited in scope to testing the
transform behaves correctly with input arguments that perfectly match
the ParallelLoop's iterator arg set. The one new piece of functionality
is that invalid operations will now be skipped with an error messages
instead of producing an assertion failure, so the pass can be used with
expected failures for pieces of the IR not cared about with a specific
RUN command.

Diff Detail

Event Timeline

tpopp created this revision.Apr 4 2023, 2:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 2:42 AM
tpopp requested review of this revision.Apr 4 2023, 2:42 AM
tpopp retitled this revision from [MLIR] Prefix parallel-loop-collapsing with test-scf- to [MLIR] Clarify (test-scf-)parallel-loop-collapsing with.Apr 4 2023, 2:46 AM
tpopp retitled this revision from [MLIR] Clarify (test-scf-)parallel-loop-collapsing with to [MLIR] Clarify (test-scf-)parallel-loop-collapsing.
mehdi_amini added inline comments.Apr 4 2023, 9:04 AM
mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
52–53

Can you add a description indicating that this is a pass intended for unit testing the collapseParallelLoops utility? The summary does not make it clear.

mehdi_amini accepted this revision.Apr 4 2023, 9:05 AM
This revision is now accepted and ready to land.Apr 4 2023, 9:05 AM
bondhugula accepted this revision.Apr 4 2023, 9:32 AM
tpopp marked an inline comment as done.Apr 5 2023, 2:20 AM