[Mlir-commits] [mlir] [MLIR][Python] Add python bindings for IRDL dialect (PR #158488)
Rolf Morel
llvmlistbot at llvm.org
Wed Sep 17 04:20:28 PDT 2025
================
@@ -0,0 +1,36 @@
+//===--- DialectIRDL.cpp - Pybind module for IRDL dialect API support ---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir-c/Dialect/IRDL.h"
+#include "mlir-c/IR.h"
+#include "mlir-c/Support.h"
+#include "mlir/Bindings/Python/Nanobind.h"
+#include "mlir/Bindings/Python/NanobindAdaptors.h"
+
+namespace nb = nanobind;
+using namespace llvm;
----------------
rolfmorel wrote:
Nit: do you need the `llvm` namespace here? I am not so sure about the others either.
https://github.com/llvm/llvm-project/pull/158488
More information about the Mlir-commits
mailing list