This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization] Implement BufferDeallocationopInterface for scf.forall.in_parallel
ClosedPublic

Authored by maerhart on Aug 28 2023, 5:29 AM.

Details

Summary

The scf.forall.in_parallel terminator operation has a nested graph region with
the NoTerminator trait. Such regions are not supported by the default
implementations. Therefore, this commit adds a specialized implementation for
this operation which only covers the case where the nested region is empty.
This is because after bufferization, ops like tensor.parallel_insert_slice were
already converted to memref operations residing int the scf.forall only and the
nested region of scf.forall.in_parallel ends up empty.

Depends on D158828

Diff Detail

Event Timeline

maerhart created this revision.Aug 28 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2023, 5:29 AM
maerhart requested review of this revision.Aug 28 2023, 5:29 AM
springerm accepted this revision.Aug 31 2023, 8:05 AM
springerm added inline comments.
mlir/lib/Dialect/SCF/Transforms/BufferDeallocationOpInterfaceImpl.cpp
52

I think you can write getBody().

63

/*toBlock=*/nullptr

This revision is now accepted and ready to land.Aug 31 2023, 8:05 AM
maerhart updated this revision to Diff 556571.Sep 12 2023, 6:54 AM
maerhart marked 2 inline comments as done.

address comments

maerhart updated this revision to Diff 556586.Sep 12 2023, 8:57 AM

fix pointer deref

This revision was landed with ongoing or failed builds.Sep 13 2023, 2:31 AM
This revision was automatically updated to reflect the committed changes.