[all-commits] [llvm/llvm-project] f796bc: [MLIR][Linalg] Expose linalg.matmul and linalg.con...

Rolf Morel via All-commits all-commits at lists.llvm.org
Mon Feb 10 04:05:34 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f796bc622a7725708b8ffbe0c7a684a8557e77a3
      https://github.com/llvm/llvm-project/commit/f796bc622a7725708b8ffbe0c7a684a8557e77a3
  Author: Rolf Morel <rolf.morel at intel.com>
  Date:   2025-02-10 (Mon, 10 Feb 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/include/mlir/IR/CommonAttrConstraints.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/python/mlir/dialects/linalg/__init__.py
    M mlir/test/Dialect/Linalg/named-ops.mlir
    M mlir/test/python/dialects/linalg/ops.py
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [MLIR][Linalg] Expose linalg.matmul and linalg.contract via Python API (#126377)

Now that linalg.matmul is in tablegen, "hand write" the Python wrapper
that OpDSL used to derive. Similarly, add a Python wrapper for the new
linalg.contract op.

Required following misc. fixes:
1) make linalg.matmul's parsing and printing consistent w.r.t. whether
indexing_maps occurs before or after operands, i.e. per the tests cases
it comes _before_.
2) tablegen for linalg.contract did not state it accepted an optional
cast attr.
3) In ODS's C++-generating code, expand partial support for `$_builder`
access in `Attr::defaultValue` to full support. This enables access to
the current `MlirContext` when constructing the default value (as is
required when the default value consists of affine maps).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list