[Mlir-commits] [mlir] b96bd02 - [mlir][transform][gpu][python] Add .td file for bindings.
Ingo Müller
llvmlistbot at llvm.org
Wed Jul 19 08:35:03 PDT 2023
Author: Ingo Müller
Date: 2023-07-19T15:34:59Z
New Revision: b96bd025b35761ae181da7e1796708c46e59f5d5
URL: https://github.com/llvm/llvm-project/commit/b96bd025b35761ae181da7e1796708c46e59f5d5
DIFF: https://github.com/llvm/llvm-project/commit/b96bd025b35761ae181da7e1796708c46e59f5d5.diff
LOG: [mlir][transform][gpu][python] Add .td file for bindings.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D155602
Added:
mlir/python/mlir/dialects/GPUTransformOps.td
mlir/python/mlir/dialects/transform/gpu.py
Modified:
mlir/python/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/python/CMakeLists.txt b/mlir/python/CMakeLists.txt
index 22a55dbb66aa9b..e5d37b2289862d 100644
--- a/mlir/python/CMakeLists.txt
+++ b/mlir/python/CMakeLists.txt
@@ -143,6 +143,15 @@ declare_mlir_dialect_extension_python_bindings(
DIALECT_NAME transform
EXTENSION_NAME bufferization_transform)
+declare_mlir_dialect_extension_python_bindings(
+ ADD_TO_PARENT MLIRPythonSources.Dialects
+ ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
+ TD_FILE dialects/GPUTransformOps.td
+ SOURCES
+ dialects/transform/gpu.py
+ DIALECT_NAME transform
+ EXTENSION_NAME gpu_transform)
+
declare_mlir_dialect_extension_python_bindings(
ADD_TO_PARENT MLIRPythonSources.Dialects
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
diff --git a/mlir/python/mlir/dialects/GPUTransformOps.td b/mlir/python/mlir/dialects/GPUTransformOps.td
new file mode 100644
index 00000000000000..08bd9537b459b0
--- /dev/null
+++ b/mlir/python/mlir/dialects/GPUTransformOps.td
@@ -0,0 +1,20 @@
+//===-- GPUTransformOps.td ---------------------------------*- tablegen -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Entry point of the Python bindings generator for the transform ops provided
+// by the GPU dialect.
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifndef PYTHON_BINDINGS_GPU_TRANSFORM_OPS
+#define PYTHON_BINDINGS_GPU_TRANSFORM_OPS
+
+include "mlir/Dialect/GPU/TransformOps/GPUTransformOps.td"
+
+#endif // PYTHON_BINDINGS_GPU_TRANSFORM_OPS
diff --git a/mlir/python/mlir/dialects/transform/gpu.py b/mlir/python/mlir/dialects/transform/gpu.py
new file mode 100644
index 00000000000000..8c3de0de7ea3f1
--- /dev/null
+++ b/mlir/python/mlir/dialects/transform/gpu.py
@@ -0,0 +1,5 @@
+# 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
+
+from .._gpu_transform_ops_gen import *
More information about the Mlir-commits
mailing list