This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization] Make memory_space a dialect attribute
Changes PlannedPublic

Authored by springerm on Oct 17 2022, 3:19 AM.

Details

Summary

Some ops are not bufferized directly but rewritten into a combination of other (transitory) ops that can then bufferize independently (e.g., tensor.pad). This change makes it possible to attach memory space information to transitory ops.

Similar to bufferization.escape, bufferization.memory_space is now also an array attribute: One IntegerAttr per OpResult.

Diff Detail

Event Timeline

springerm created this revision.Oct 17 2022, 3:19 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm requested review of this revision.Oct 17 2022, 3:19 AM

LGTM for sparse (since mechanical)

springerm planned changes to this revision.Oct 19 2022, 7:09 AM

After discussing this offline, there is probably a better solution: AllocationScopeOpInterface