Skip to content

Commit b96bd02

Browse files
[mlir][transform][gpu][python] Add .td file for bindings.
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D155602
1 parent 4f60815 commit b96bd02

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

mlir/python/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ declare_mlir_dialect_extension_python_bindings(
143143
DIALECT_NAME transform
144144
EXTENSION_NAME bufferization_transform)
145145

146+
declare_mlir_dialect_extension_python_bindings(
147+
ADD_TO_PARENT MLIRPythonSources.Dialects
148+
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
149+
TD_FILE dialects/GPUTransformOps.td
150+
SOURCES
151+
dialects/transform/gpu.py
152+
DIALECT_NAME transform
153+
EXTENSION_NAME gpu_transform)
154+
146155
declare_mlir_dialect_extension_python_bindings(
147156
ADD_TO_PARENT MLIRPythonSources.Dialects
148157
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===-- GPUTransformOps.td ---------------------------------*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// Entry point of the Python bindings generator for the transform ops provided
10+
// by the GPU dialect.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
15+
#ifndef PYTHON_BINDINGS_GPU_TRANSFORM_OPS
16+
#define PYTHON_BINDINGS_GPU_TRANSFORM_OPS
17+
18+
include "mlir/Dialect/GPU/TransformOps/GPUTransformOps.td"
19+
20+
#endif // PYTHON_BINDINGS_GPU_TRANSFORM_OPS
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
from .._gpu_transform_ops_gen import *

0 commit comments

Comments
 (0)