This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Python][Linalg] Add support for captures in body builder.
ClosedPublic

Authored by nicolasvasilache on Apr 12 2021, 11:35 PM.

Details

Summary

When Linalg named ops support was added, captures were omitted
from the body builder. This revision adds support for captures
which allows us to write FillOp in a more idiomatic fashion using
the _linalg_ops_ext mixin support.

This raises an issue in the generation of _linalg_ops_gen.py where

  @property
  def result(self):
    return self.operation.results[0] if len(self.operation.results) > 1 else None
```.
The condition should be `== 1`.

This will be fixed in a separate commit.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Apr 12 2021, 11:35 PM
ftynse accepted this revision.Apr 13 2021, 9:44 AM
This revision is now accepted and ready to land.Apr 13 2021, 9:44 AM