This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Drop function attribute from generic ops.
ClosedPublic

Authored by nicolasvasilache on Apr 15 2020, 7:06 PM.

Details

Summary

The function attribute in generic ops is not paying for itself.
A region is the more standardized way of specifying a custom computation.
If needed this region can call a function directly.
This is deemed more natural than managing a dedicated function attribute.

This also simplifies named ops generation by trimming unnecessary complexity.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 7:06 PM
mravishankar accepted this revision.Apr 15 2020, 9:40 PM

This looks good to me. Thanks for taking care of this. The function attribute on generic/indexed generic doesnt seem to provide value.

mlir/test/Dialect/Linalg/invalid.mlir
56–57

Nit: Change function name to @generic_no_region

This revision is now accepted and ready to land.Apr 15 2020, 9:40 PM
mehdi_amini accepted this revision.Apr 15 2020, 9:44 PM

Thanks for the cleanup! :)

ftynse accepted this revision.Apr 16 2020, 1:18 AM

Rename test function.

This revision was automatically updated to reflect the committed changes.