forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding util transform dialect ops that support util.func. (iree-org#1…
…6426) Tests are changed as part of iree-org#16411 (as that's required to make this work in general).
- Loading branch information
Showing
9 changed files
with
645 additions
and
1 deletion.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
compiler/src/iree/compiler/Dialect/Util/TransformOps/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 2024 The IREE Authors | ||
# | ||
# Licensed 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 | ||
|
||
load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_gentbl_cc_library", "iree_td_library") | ||
load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob") | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["layering_check"], | ||
licenses = ["notice"], # Apache 2.0 | ||
) | ||
|
||
iree_td_library( | ||
name = "td_files", | ||
srcs = enforce_glob( | ||
[ | ||
"UtilTransformOps.td", | ||
], | ||
include = ["*.td"], | ||
), | ||
deps = [ | ||
"@llvm-project//mlir:OpBaseTdFiles", | ||
"@llvm-project//mlir:TransformDialectTdFiles", | ||
], | ||
) | ||
|
||
iree_gentbl_cc_library( | ||
name = "UtilTransformOpsGen", | ||
tbl_outs = [ | ||
( | ||
["--gen-op-decls"], | ||
"UtilTransformOps.h.inc", | ||
), | ||
( | ||
["--gen-op-defs"], | ||
"UtilTransformOps.cpp.inc", | ||
), | ||
], | ||
tblgen = "@llvm-project//mlir:mlir-tblgen", | ||
td_file = "UtilTransformOps.td", | ||
deps = [":td_files"], | ||
) | ||
|
||
iree_compiler_cc_library( | ||
name = "TransformOps", | ||
srcs = [ | ||
"UtilTransformOps.cpp", | ||
"UtilTransformOps.cpp.inc", | ||
], | ||
hdrs = [ | ||
"UtilTransformOps.h", | ||
"UtilTransformOps.h.inc", | ||
], | ||
deps = [ | ||
":UtilTransformOpsGen", | ||
"//compiler/src/iree/compiler/Dialect/Util/IR", | ||
"//compiler/src/iree/compiler/Utils", | ||
"@llvm-project//llvm:Support", | ||
"@llvm-project//mlir:IR", | ||
"@llvm-project//mlir:PDLDialect", | ||
"@llvm-project//mlir:Support", | ||
"@llvm-project//mlir:TransformDialect", | ||
"@llvm-project//mlir:TransformUtils", | ||
], | ||
) |
45 changes: 45 additions & 0 deletions
45
compiler/src/iree/compiler/Dialect/Util/TransformOps/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
################################################################################ | ||
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from # | ||
# compiler/src/iree/compiler/Dialect/Util/TransformOps/BUILD.bazel # | ||
# # | ||
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary # | ||
# CMake-only content. # | ||
# # | ||
# To disable autogeneration for this file entirely, delete this header. # | ||
################################################################################ | ||
|
||
iree_add_all_subdirs() | ||
|
||
iree_tablegen_library( | ||
NAME | ||
UtilTransformOpsGen | ||
TD_FILE | ||
"UtilTransformOps.td" | ||
OUTS | ||
--gen-op-decls UtilTransformOps.h.inc | ||
--gen-op-defs UtilTransformOps.cpp.inc | ||
) | ||
|
||
iree_cc_library( | ||
NAME | ||
TransformOps | ||
HDRS | ||
"UtilTransformOps.h" | ||
"UtilTransformOps.h.inc" | ||
SRCS | ||
"UtilTransformOps.cpp" | ||
"UtilTransformOps.cpp.inc" | ||
DEPS | ||
::UtilTransformOpsGen | ||
LLVMSupport | ||
MLIRIR | ||
MLIRPDLDialect | ||
MLIRSupport | ||
MLIRTransformDialect | ||
MLIRTransformUtils | ||
iree::compiler::Dialect::Util::IR | ||
iree::compiler::Utils | ||
PUBLIC | ||
) | ||
|
||
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ### |
Oops, something went wrong.