summaryrefslogtreecommitdiff
path: root/mlir/examples
diff options
context:
space:
mode:
authorvfdev <vfdev.5@gmail.com>2025-01-13 12:00:31 +0100
committerGitHub <noreply@github.com>2025-01-13 03:00:31 -0800
commitf136c800b60dbfacdbb645e7e92acba52e2f279f (patch)
treec3932fa35c97958bad2c9f91b23bb9f847f07bb6 /mlir/examples
parent7e2eb0f83e1cf6861c8fd1f038a88a8ddd851c34 (diff)
Enabled freethreading support in MLIR python bindings (#122684)
Reland reverted https://github.com/llvm/llvm-project/pull/107103 with the fixes for Python 3.8 cc @jpienaar Co-authored-by: Peter Hawkins <phawkins@google.com>
Diffstat (limited to 'mlir/examples')
-rw-r--r--mlir/examples/standalone/python/StandaloneExtensionPybind11.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mlir/examples/standalone/python/StandaloneExtensionPybind11.cpp b/mlir/examples/standalone/python/StandaloneExtensionPybind11.cpp
index 397db4c20e74..dd3c4c2945cc 100644
--- a/mlir/examples/standalone/python/StandaloneExtensionPybind11.cpp
+++ b/mlir/examples/standalone/python/StandaloneExtensionPybind11.cpp
@@ -12,9 +12,11 @@
#include "Standalone-c/Dialects.h"
#include "mlir/Bindings/Python/PybindAdaptors.h"
+namespace py = pybind11;
+
using namespace mlir::python::adaptors;
-PYBIND11_MODULE(_standaloneDialectsPybind11, m) {
+PYBIND11_MODULE(_standaloneDialectsPybind11, m, py::mod_gil_not_used()) {
//===--------------------------------------------------------------------===//
// standalone dialect
//===--------------------------------------------------------------------===//