This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Add a polymorphic linalg.copy operation
ClosedPublic

Authored by nicolasvasilache on Mar 8 2022, 9:49 AM.

Details

Summary

With the recent improvements to OpDSL it is cheap to reintroduce a linalg.copy operation.

This operation is needed in at least 2 cases:

  1. for copies that may want to change the elemental type (e.g. cast, truncate, quantize, etc)
  2. to specify new tensors that should bufferize to a copy operation. The linalg.generic form always folds away which is not always the right call.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 9:49 AM
nicolasvasilache requested review of this revision.Mar 8 2022, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 9:49 AM
springerm accepted this revision.Mar 8 2022, 9:52 AM
This revision is now accepted and ready to land.Mar 8 2022, 9:52 AM
This revision was landed with ongoing or failed builds.Mar 8 2022, 9:53 AM
This revision was automatically updated to reflect the committed changes.