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/NanobindAdaptors.h
"
12
#include "
mlir/Bindings/Python/Nanobind.h
"
13
14
namespace
nb
=
nanobind
;
15
16
static
void
populateDialectLinalgSubmodule
(nb::module_ m) {
17
m.def(
18
"fill_builtin_region"
,
19
[](MlirOperation op) {
mlirLinalgFillBuiltinNamedOpRegion
(op); },
20
nb::arg(
"op"
),
21
"Fill the region for `op`, which is assumed to be a builtin named Linalg "
22
"op."
);
23
}
24
25
NB_MODULE
(_mlirDialectsLinalg, m) {
26
m.doc() =
"MLIR Linalg dialect."
;
27
28
populateDialectLinalgSubmodule
(m);
29
}
populateDialectLinalgSubmodule
static void populateDialectLinalgSubmodule(nb::module_ m)
Definition:
DialectLinalg.cpp:16
NB_MODULE
NB_MODULE(_mlirDialectsLinalg, m)
Definition:
DialectLinalg.cpp:25
NanobindAdaptors.h
Nanobind.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
nanobind
Definition:
NanobindAdaptors.h:32
Generated on Sat Dec 21 2024 16:31:37 for MLIR by
1.9.1