This is an archive of the discontinued LLVM Phabricator instance.

Replace `outs` with `inits` in linalg textual assembly
AcceptedPublic

Authored by mehdi_amini on Mar 14 2023, 5:16 AM.

Details

Summary

The "outs" is confusing for the tensor domain as these are immutable
object. These arguments are used for:

  • the iteration domain / shape of the results.
  • the initial value used when reduction are involved.

Diff Detail

Event Timeline

mehdi_amini created this revision.Mar 14 2023, 5:16 AM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
mehdi_amini requested review of this revision.Mar 14 2023, 5:16 AM
pifon2a accepted this revision.Mar 14 2023, 5:24 AM

Thanks!

This revision is now accepted and ready to land.Mar 14 2023, 5:24 AM

I'll wait to hear at least from @mravishankar @nicolasvasilache here.

I don't have strong opinions here, all names are confusing ..

init makes one think that the tensor needs to be initialized to a meaningful value, this is not the case if the associated bbArg is not used.
out confuses people for other reasons.

if anything, I'd go for dest personally with a doc that the dest may or may not be read.

if anything, I'd go for dest personally with a doc that the dest may or may not be read.

dest looks to me like "writing to a tensor" again. The "destination" of the tensor-based op is the LHS of the = and the "yielded" values in the body.