[Mlir-commits] [mlir] Users/makslevental/mlirpythonsupport visibility (PR #173415)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 23 12:11:26 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- mlir/include/mlir/Bindings/Python/IRCore.h mlir/examples/standalone/include/Standalone-c/Dialects.h mlir/examples/standalone/lib/CAPI/Dialects.cpp mlir/examples/standalone/python/StandaloneExtensionNanobind.cpp mlir/include/mlir-c/Support.h mlir/include/mlir/Bindings/Python/IRTypes.h mlir/lib/Bindings/Python/DialectSMT.cpp mlir/lib/Bindings/Python/IRAffine.cpp mlir/lib/Bindings/Python/IRAttributes.cpp mlir/lib/Bindings/Python/IRCore.cpp mlir/lib/Bindings/Python/IRInterfaces.cpp mlir/lib/Bindings/Python/IRTypes.cpp mlir/lib/Bindings/Python/MainModule.cpp mlir/lib/Bindings/Python/Pass.cpp mlir/lib/Bindings/Python/Pass.h mlir/lib/Bindings/Python/Rewrite.cpp mlir/lib/Bindings/Python/Rewrite.h mlir/test/python/lib/PythonTestModuleNanobind.cpp mlir/include/mlir/Bindings/Python/Globals.h mlir/include/mlir/Bindings/Python/NanobindUtils.h mlir/lib/Bindings/Python/Globals.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/include/mlir/Bindings/Python/IRCore.h b/mlir/include/mlir/Bindings/Python/IRCore.h
index 29d72a8b1..4ab567b0e 100644
--- a/mlir/include/mlir/Bindings/Python/IRCore.h
+++ b/mlir/include/mlir/Bindings/Python/IRCore.h
@@ -650,7 +650,8 @@ public:
 class PyOperation;
 class PyOpView;
 using PyOperationRef = PyObjectRef<PyOperation>;
-class MLIR_PYTHON_API_EXPORTED PyOperation : public PyOperationBase, public BaseContextObject {
+class MLIR_PYTHON_API_EXPORTED PyOperation : public PyOperationBase,
+                                             public BaseContextObject {
 public:
   MLIR_PYTHON_API_EXPORTED ~PyOperation() override;
   MLIR_PYTHON_API_EXPORTED PyOperation &getOperation() override {
@@ -1230,7 +1231,8 @@ public:
   MLIR_PYTHON_API_EXPORTED static void bindDerived(ClassTy &m) {}
 };
 
-class MLIR_PYTHON_API_EXPORTED PyStringAttribute : public PyConcreteAttribute<PyStringAttribute> {
+class MLIR_PYTHON_API_EXPORTED PyStringAttribute
+    : public PyConcreteAttribute<PyStringAttribute> {
 public:
   static constexpr IsAFunctionTy isaFunction = mlirAttributeIsAString;
   static constexpr const char *pyClassName = "StringAttr";
@@ -1599,7 +1601,8 @@ private:
 
 /// Regions of an op are fixed length and indexed numerically so are represented
 /// with a sequence-like container.
-class MLIR_PYTHON_API_EXPORTED PyRegionList : public Sliceable<PyRegionList, PyRegion> {
+class MLIR_PYTHON_API_EXPORTED PyRegionList
+    : public Sliceable<PyRegionList, PyRegion> {
 public:
   static constexpr const char *pyClassName = "RegionSequence";
 
@@ -2015,7 +2018,8 @@ getValueTypes(Container &container, PyMlirContextRef &context) {
 /// elements, random access is cheap. The (returned) result list is associated
 /// with the operation whose results these are, and thus extends the lifetime of
 /// this operation.
-class MLIR_PYTHON_API_EXPORTED PyOpResultList : public Sliceable<PyOpResultList, PyOpResult> {
+class MLIR_PYTHON_API_EXPORTED PyOpResultList
+    : public Sliceable<PyOpResultList, PyOpResult> {
 public:
   static constexpr const char *pyClassName = "OpResultList";
   using SliceableT = Sliceable<PyOpResultList, PyOpResult>;
@@ -2071,7 +2075,8 @@ private:
 };
 
 /// Python wrapper for MlirBlockArgument.
-class MLIR_PYTHON_API_EXPORTED PyBlockArgument : public PyConcreteValue<PyBlockArgument> {
+class MLIR_PYTHON_API_EXPORTED PyBlockArgument
+    : public PyConcreteValue<PyBlockArgument> {
 public:
   static constexpr IsAFunctionTy isaFunction = mlirValueIsABlockArgument;
   static constexpr const char *pyClassName = "BlockArgument";
@@ -2165,7 +2170,8 @@ private:
 /// elements, random access is cheap. The (returned) operand list is associated
 /// with the operation whose operands these are, and thus extends the lifetime
 /// of this operation.
-class MLIR_PYTHON_API_EXPORTED PyOpOperandList : public Sliceable<PyOpOperandList, PyValue> {
+class MLIR_PYTHON_API_EXPORTED PyOpOperandList
+    : public Sliceable<PyOpOperandList, PyValue> {
 public:
   static constexpr const char *pyClassName = "OpOperandList";
   using SliceableT = Sliceable<PyOpOperandList, PyValue>;
@@ -2226,7 +2232,8 @@ private:
 /// elements, random access is cheap. The (returned) successor list is
 /// associated with the operation whose successors these are, and thus extends
 /// the lifetime of this operation.
-class MLIR_PYTHON_API_EXPORTED PyOpSuccessors : public Sliceable<PyOpSuccessors, PyBlock> {
+class MLIR_PYTHON_API_EXPORTED PyOpSuccessors
+    : public Sliceable<PyOpSuccessors, PyBlock> {
 public:
   static constexpr const char *pyClassName = "OpSuccessors";
 
@@ -2277,7 +2284,8 @@ private:
 /// elements, random access is cheap. The (returned) successor list is
 /// associated with the operation and block whose successors these are, and thus
 /// extends the lifetime of this operation and block.
-class MLIR_PYTHON_API_EXPORTED PyBlockSuccessors : public Sliceable<PyBlockSuccessors, PyBlock> {
+class MLIR_PYTHON_API_EXPORTED PyBlockSuccessors
+    : public Sliceable<PyBlockSuccessors, PyBlock> {
 public:
   static constexpr const char *pyClassName = "BlockSuccessors";
 
@@ -2322,7 +2330,8 @@ private:
 /// WARNING: This Sliceable is more expensive than the others here because
 /// mlirBlockGetPredecessor actually iterates the use-def chain (of block
 /// operands) anew for each indexed access.
-class MLIR_PYTHON_API_EXPORTED PyBlockPredecessors : public Sliceable<PyBlockPredecessors, PyBlock> {
+class MLIR_PYTHON_API_EXPORTED PyBlockPredecessors
+    : public Sliceable<PyBlockPredecessors, PyBlock> {
 public:
   static constexpr const char *pyClassName = "BlockPredecessors";
 
diff --git a/mlir/include/mlir/Bindings/Python/IRTypes.h b/mlir/include/mlir/Bindings/Python/IRTypes.h
index dc203d30e..79ff6f72d 100644
--- a/mlir/include/mlir/Bindings/Python/IRTypes.h
+++ b/mlir/include/mlir/Bindings/Python/IRTypes.h
@@ -15,7 +15,8 @@
 namespace mlir {
 
 /// Shaped Type Interface - ShapedType
-class MLIR_PYTHON_API_EXPORTED PyShapedType : public python::PyConcreteType<PyShapedType> {
+class MLIR_PYTHON_API_EXPORTED PyShapedType
+    : public python::PyConcreteType<PyShapedType> {
 public:
   static const IsAFunctionTy isaFunction;
   static constexpr const char *pyClassName = "ShapedType";

``````````

</details>


https://github.com/llvm/llvm-project/pull/173415


More information about the Mlir-commits mailing list