[all-commits] [llvm/llvm-project] b5f3a1: [mlir][Python][Linalg] Add support for captures in...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Fri Apr 16 01:48:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5f3a128bf8cae46ccf0616477a4775fd168fd7c
      https://github.com/llvm/llvm-project/commit/b5f3a128bf8cae46ccf0616477a4775fd168fd7c
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-04-16 (Fri, 16 Apr 2021)

  Changed paths:
    M mlir/include/mlir-c/Dialect/Linalg.h
    M mlir/lib/Bindings/Python/DialectLinalg.cpp
    M mlir/lib/Bindings/Python/mlir/dialects/_linalg_ops_ext.py
    M mlir/lib/CAPI/Dialect/Linalg.cpp
    M mlir/test/Bindings/Python/dialects/linalg/ops.py

  Log Message:
  -----------
  [mlir][Python][Linalg] Add support for captures in body builder.

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.

Differential Revision: https://reviews.llvm.org/D100363




More information about the All-commits mailing list