MLIR
20.0.0git
lib
Bindings
Python
DialectLinalg.cpp
Go to the documentation of this file.
1
//===- DialectLinalg.cpp - Pybind module for Linalg dialect API support --===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "
mlir-c/Dialect/Linalg.h
"
10
#include "
mlir-c/IR.h
"
11
#include "
mlir/Bindings/Python/PybindAdaptors.h
"
12
13
namespace
py
=
pybind11
;
14
15
static
void
populateDialectLinalgSubmodule
(py::module m) {
16
m.def(
17
"fill_builtin_region"
,
18
[](MlirOperation op) {
mlirLinalgFillBuiltinNamedOpRegion
(op); },
19
py::arg(
"op"
),
20
"Fill the region for `op`, which is assumed to be a builtin named Linalg "
21
"op."
);
22
}
23
24
PYBIND11_MODULE
(_mlirDialectsLinalg, m) {
25
m.doc() =
"MLIR Linalg dialect."
;
26
27
populateDialectLinalgSubmodule
(m);
28
}
populateDialectLinalgSubmodule
static void populateDialectLinalgSubmodule(py::module m)
Definition:
DialectLinalg.cpp:15
PYBIND11_MODULE
PYBIND11_MODULE(_mlirDialectsLinalg, m)
Definition:
DialectLinalg.cpp:24
PybindAdaptors.h
Linalg.h
mlirLinalgFillBuiltinNamedOpRegion
MLIR_CAPI_EXPORTED void mlirLinalgFillBuiltinNamedOpRegion(MlirOperation mlirOp)
Apply the special region builder for the builtin named Linalg op.
Definition:
Linalg.cpp:18
IR.h
pybind11
Definition:
PybindAdaptors.h:37
Generated on Tue Oct 8 2024 00:39:13 for MLIR by
1.9.1