13#include "mlir/Bindings/Python/NanobindAdaptors.h"
15#include <nanobind/nanobind.h>
20using namespace mlir::python::nanobind_adaptors;
24 m.doc() =
"RTG dialect Python native extension";
29 [](nb::object cls, MlirContext ctxt) {
32 nb::arg(
"self"), nb::arg(
"ctxt") =
nullptr);
37 [](nb::object cls, MlirContext ctxt) {
40 nb::arg(
"self"), nb::arg(
"ctxt") =
nullptr);
48 nb::arg(
"self"), nb::arg(
"element_type"));
56 nb::arg(
"self"), nb::arg(
"element_type"));
61 [](nb::object cls, MlirContext ctxt,
62 const std::vector<std::pair<MlirAttribute, MlirType>> &entries) {
63 std::vector<MlirAttribute> names;
64 std::vector<MlirType> types;
65 for (
auto entry : entries) {
66 names.push_back(entry.first);
67 types.push_back(entry.second);
72 nb::arg(
"self"), nb::arg(
"ctxt") =
nullptr,
74 std::vector<std::pair<MlirAttribute, MlirType>>());
MLIR_CAPI_EXPORTED MlirType rtgLabelTypeGet(MlirContext ctxt)
Creates an RTG mode type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsABag(MlirType type)
If the type is an RTG bag.
MLIR_CAPI_EXPORTED MlirType rtgSetTypeGet(MlirType elementType)
Creates an RTG set type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsASet(MlirType type)
If the type is an RTG set.
MLIR_CAPI_EXPORTED bool rtgTypeIsADict(MlirType type)
If the type is an RTG dict.
MLIR_CAPI_EXPORTED MlirType rtgSequenceTypeGet(MlirContext ctxt)
Creates an RTG sequence type in the context.
MLIR_CAPI_EXPORTED MlirType rtgDictTypeGet(MlirContext ctxt, intptr_t numEntries, MlirAttribute const *entryNames, MlirType const *entryTypes)
Creates an RTG dict type in the context.
MLIR_CAPI_EXPORTED MlirType rtgBagTypeGet(MlirType elementType)
Creates an RTG bag type in the context.
MLIR_CAPI_EXPORTED bool rtgTypeIsASequence(MlirType type)
If the type is an RTG sequence.
MLIR_CAPI_EXPORTED bool rtgTypeIsALabel(MlirType type)
If the type is an RTG label.
void populateDialectRTGSubmodule(nanobind::module_ &m)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.