diff --git a/mlir/python/CMakeLists.txt b/mlir/python/CMakeLists.txt --- a/mlir/python/CMakeLists.txt +++ b/mlir/python/CMakeLists.txt @@ -202,6 +202,15 @@ DIALECT_NAME transform EXTENSION_NAME structured_transform) +declare_mlir_dialect_extension_python_bindings( + ADD_TO_PARENT MLIRPythonSources.Dialects + ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir" + TD_FILE dialects/TensorTransformOps.td + SOURCES + dialects/transform/tensor.py + DIALECT_NAME transform + EXTENSION_NAME tensor_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/TensorTransformOps.td b/mlir/python/mlir/dialects/TensorTransformOps.td new file mode 100644 --- /dev/null +++ b/mlir/python/mlir/dialects/TensorTransformOps.td @@ -0,0 +1,20 @@ +//===-- TensorTransformOps.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 tensor dialect. +// +//===----------------------------------------------------------------------===// + + +#ifndef PYTHON_BINDINGS_TENSOR_TRANSFORM_OPS +#define PYTHON_BINDINGS_TENSOR_TRANSFORM_OPS + +include "mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td" + +#endif // PYTHON_BINDINGS_TENSOR_TRANSFORM_OPS diff --git a/mlir/python/mlir/dialects/transform/tensor.py b/mlir/python/mlir/dialects/transform/tensor.py new file mode 100644 --- /dev/null +++ b/mlir/python/mlir/dialects/transform/tensor.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 .._tensor_transform_ops_gen import *