mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-05 08:58:13 +00:00
[mlir][transform][tensor][python] Add .td files for bindings.
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D156914
This commit is contained in:
parent
a093598e50
commit
1b5a3c90cc
@ -202,6 +202,15 @@ declare_mlir_dialect_extension_python_bindings(
|
||||
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"
|
||||
|
20
mlir/python/mlir/dialects/TensorTransformOps.td
Normal file
20
mlir/python/mlir/dialects/TensorTransformOps.td
Normal file
@ -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
|
5
mlir/python/mlir/dialects/transform/tensor.py
Normal file
5
mlir/python/mlir/dialects/transform/tensor.py
Normal file
@ -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 *
|
@ -909,6 +909,25 @@ gentbl_filegroup(
|
||||
],
|
||||
)
|
||||
|
||||
gentbl_filegroup(
|
||||
name = "TensorTransformOpsPyGen",
|
||||
tbl_outs = [
|
||||
(
|
||||
[
|
||||
"-gen-python-op-bindings",
|
||||
"-bind-dialect=transform",
|
||||
"-dialect-extension=tensor_transform",
|
||||
],
|
||||
"mlir/dialects/_tensor_transform_ops_gen.py",
|
||||
),
|
||||
],
|
||||
tblgen = "//mlir:mlir-tblgen",
|
||||
td_file = "mlir/dialects/TensorTransformOps.td",
|
||||
deps = [
|
||||
"//mlir:TensorTransformOpsTdFiles",
|
||||
],
|
||||
)
|
||||
|
||||
gentbl_filegroup(
|
||||
name = "VectorTransformEnumPyGen",
|
||||
tbl_outs = [
|
||||
@ -964,6 +983,7 @@ filegroup(
|
||||
":MemRefTransformOpsPyGen",
|
||||
":PDLTransformOpsPyGen",
|
||||
":StructuredTransformOpsPyGen",
|
||||
":TensorTransformOpsPyGen",
|
||||
":TransformEnumPyGen",
|
||||
":TransformOpsPyGen",
|
||||
":VectorTransformEnumPyGen",
|
||||
|
Loading…
x
Reference in New Issue
Block a user