Page MenuHomePhabricator

[MLIR][GPU] Add error checking to loop.parallel to gpu transform.
ClosedPublic

Authored by herhut on Mar 2 2020, 9:06 AM.

Details

Summary

Instead of crashing on malformed input, the pass now produces error
messages.

Diff Detail

Event Timeline

herhut created this revision.Mar 2 2020, 9:06 AM
ftynse accepted this revision.Mar 3 2020, 2:06 AM

A couple of nits, looks good otherwise.

mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
575

Nit: DenseMap is re-exported to the mlir namespace

635

isa_and_nonnull here and below

651

Nit: I think you can do return paralellOp.emitOpError() ..., it is convertible to LogicalResult

675

Typo: processor

This revision is now accepted and ready to land.Mar 3 2020, 2:06 AM
herhut updated this revision to Diff 247841.Mar 3 2020, 2:56 AM
herhut marked 4 inline comments as done.

Review comments.

This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.Mar 3 2020, 9:18 AM
mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
760

Drop the llvm:: here please.

809

nit: Can we use a type instead of auto? It helps with readability.