Skip to content

Commit da6d5fe

Browse files
authored
Deleting iree_input dialect. (#20256)
The dialect is no longer used and we encourage projects to lower directly to the appropriate HAL and flow ops. The input dialect predates MLIR's versioning mechanism and we weren't versioning iree_input manually anyway so it was just adding an extra layer of goo - if in the future we want to version the input ops in the internal dialects we can do so using MLIR's versioning mechanism. The IREEImportPublic pass is still used for func->util conversion today and will be removed in a follow-up PR.
1 parent de4031d commit da6d5fe

35 files changed

+11
-4038
lines changed

compiler/src/iree/compiler/InputConversion/Common/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ iree_compiler_cc_library(
6363
"//compiler/src/iree/compiler/Dialect/Util/Transforms",
6464
"//compiler/src/iree/compiler/Pipelines:Options",
6565
"//compiler/src/iree/compiler/Utils",
66-
"//llvm-external-projects/iree-dialects:IREEInputDialect",
6766
"@llvm-project//llvm:Support",
6867
"@llvm-project//mlir:ArithDialect",
6968
"@llvm-project//mlir:FuncDialect",

compiler/src/iree/compiler/InputConversion/Common/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ iree_cc_library(
4747
DEPS
4848
::PassHeaders
4949
::PassesIncGen
50-
IREEInputDialect
5150
LLVMSupport
5251
MLIRArithDialect
5352
MLIRFuncDialect

compiler/src/iree/compiler/InputConversion/Common/IREEImportPublic.cpp

+8-350
Large diffs are not rendered by default.

compiler/src/iree/compiler/InputConversion/Common/test/iree_import_public.mlir

-410
Large diffs are not rendered by default.

compiler/src/iree/compiler/Tools/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ iree_compiler_cc_library(
7171
"//compiler/src/iree/compiler/Pipelines",
7272
"//compiler/src/iree/compiler/Preprocessing:Passes",
7373
"//compiler/src/iree/compiler/Preprocessing/TransformExtensions:PreprocessingExtensions",
74-
"//llvm-external-projects/iree-dialects:IREEInputDialect",
7574
"//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
7675
"//llvm-external-projects/iree-dialects:IREELinalgTransformDialectPasses",
7776
"@llvm-project//mlir:IR",

compiler/src/iree/compiler/Tools/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ iree_cc_library(
2424
"init_iree_dialects.h"
2525
"init_iree_passes.h"
2626
DEPS
27-
IREEInputDialect
2827
IREELinalgTransformDialect
2928
IREELinalgTransformDialectPasses
3029
MLIRIR

compiler/src/iree/compiler/Tools/init_iree_dialects.h

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifndef IREE_COMPILER_TOOLS_INIT_IREE_DIALECTS_H_
1313
#define IREE_COMPILER_TOOLS_INIT_IREE_DIALECTS_H_
1414

15-
#include "iree-dialects/Dialect/Input/InputDialect.h"
1615
#include "iree-dialects/Dialect/LinalgTransform/Passes.h"
1716
#include "iree/compiler/Codegen/Dialect/CPU/IR/IREECPUDialect.h"
1817
#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
@@ -48,7 +47,6 @@ inline void registerIreeDialects(DialectRegistry &registry) {
4847
IREE::HAL::Inline::HALInlineDialect,
4948
IREE::HAL::Loader::HALLoaderDialect,
5049
IREE::IO::Parameters::IOParametersDialect,
51-
IREE::Input::IREEInputDialect,
5250
IREE::LinalgExt::IREELinalgExtDialect,
5351
IREE::Encoding::IREEEncodingDialect,
5452
IREE::Stream::StreamDialect,

docs/website/docs/reference/mlir-dialects/index.md

-12
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,4 @@ Dialect | Description
3434
[VM](./VM.md) | Represents operations against an abstract virtual machine
3535
[VMVX](./VMVX.md) | Virtual Machine Vector Extensions
3636

37-
## IREE public dialects
38-
39-
The ops in these dialects are legal to include in compiler inputs. The sources
40-
for these dialects can be found in the
41-
[`llvm-external-projects/iree-dialects/` directory](https://github.com/iree-org/iree/tree/main/llvm-external-projects/iree-dialects)
42-
that is designed to be used from other projects via LLVM's external projects
43-
mechanism.
44-
45-
Dialect | Description
46-
------------------------------------| -----------
47-
[IREEInput](./IREEInput.md) | Structural ops legal as input to IREE's compiler
48-
4937
[^1]: Hardware Abstraction Layer

docs/website/generate_extra_files.sh

-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ for f in ${BUILD_DOCS_PROCESSED_DIR}/*Dialect.md; do
5454
mv "$f" "${f/%Dialect.md/.md}"
5555
done
5656

57-
# Rename iree-dialect files.
58-
mv "${BUILD_DOCS_PROCESSED_DIR}/InputOps.md" "${BUILD_DOCS_PROCESSED_DIR}/IREEInput.md"
59-
# mv "${BUILD_DOCS_PROCESSED_DIR}/StructuredTransformOpsExt.md" "${BUILD_DOCS_PROCESSED_DIR}/IREEStructuredTransformExt.md"
60-
6157
# Postprocess the dialect docs (e.g. making tweaks to the markdown source).
6258
python3 "${THIS_DIR}/postprocess_dialect_docs.py" "${BUILD_DOCS_PROCESSED_DIR}"
6359

docs/website/mkdocs.yml

-3
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ nav:
185185
- Util: "reference/mlir-dialects/Util.md"
186186
- VM: "reference/mlir-dialects/VM.md"
187187
- VMVX: "reference/mlir-dialects/VMVX.md"
188-
# Dialects from llvm-external-projects/iree-dialects/
189-
- "Public dialects":
190-
- IREEInput: "reference/mlir-dialects/IREEInput.md"
191188
- "Other topics":
192189
- Glossary: "reference/glossary.md"
193190
- Optimization options: "reference/optimization-options.md"

docs/website/postprocess_dialect_docs.py

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def main(args):
7777
"IOParameters.md": "compiler/src/iree/compiler/Modules/IO/Parameters/IR",
7878
"IREECodegen.md": "compiler/src/iree/compiler/Codegen/Dialect/Codegen/IR",
7979
"IREEGPU.md": "compiler/src/iree/compiler/Codegen/Dialect/GPU/IR",
80-
"IREEInput.md": "llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input",
8180
"IREEVectorExt.md": "compiler/src/iree/compiler/Codegen/Dialect/VectorExt/IR",
8281
"LinalgExt.md": "compiler/src/iree/compiler/Dialect/LinalgExt/IR",
8382
"Stream.md": "compiler/src/iree/compiler/Dialect/Stream/IR",

llvm-external-projects/iree-dialects/BUILD.bazel

+3-115
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")
1+
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
2+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
23

34
package(
45
default_visibility = ["//visibility:public"],
@@ -17,9 +18,7 @@ exports_files(glob(["python/*.cpp"]))
1718

1819
filegroup(
1920
name = "python_dialects",
20-
srcs = glob(["python/iree/compiler/dialects/**/*.py"]) + [
21-
":python/iree/compiler/dialects/_iree_ops_gen.py",
22-
],
21+
srcs = glob(["python/iree/compiler/dialects/**/*.py"]),
2322
)
2423

2524
################################################################################
@@ -51,115 +50,6 @@ td_library(
5150
],
5251
)
5352

54-
################################################################################
55-
# IREEInput dialect
56-
################################################################################
57-
58-
gentbl_cc_library(
59-
name = "IREEInputInterfacesIncGen",
60-
tags = ["manual"],
61-
tbl_outs = [
62-
(
63-
["--gen-op-interface-decls"],
64-
"include/iree-dialects/Dialect/Input/InputOpInterfaces.h.inc",
65-
),
66-
(
67-
["--gen-op-interface-defs"],
68-
"include/iree-dialects/Dialect/Input/InputOpInterfaces.cpp.inc",
69-
),
70-
],
71-
tblgen = "@llvm-project//mlir:mlir-tblgen",
72-
td_file = "include/iree-dialects/Dialect/Input/InputInterfaces.td",
73-
deps = [":TdFiles"],
74-
)
75-
76-
gentbl_cc_library(
77-
name = "IREEInputIncGen",
78-
strip_include_prefix = "include",
79-
tbl_outs = [
80-
(
81-
["--gen-dialect-decls"],
82-
"include/iree-dialects/Dialect/Input/InputDialect.h.inc",
83-
),
84-
(
85-
["--gen-dialect-defs"],
86-
"include/iree-dialects/Dialect/Input/InputDialect.cpp.inc",
87-
),
88-
(
89-
["--gen-op-decls"],
90-
"include/iree-dialects/Dialect/Input/InputOps.h.inc",
91-
),
92-
(
93-
["--gen-op-defs"],
94-
"include/iree-dialects/Dialect/Input/InputOps.cpp.inc",
95-
),
96-
(
97-
["--gen-typedef-decls"],
98-
"include/iree-dialects/Dialect/Input/InputTypes.h.inc",
99-
),
100-
(
101-
["--gen-typedef-defs"],
102-
"include/iree-dialects/Dialect/Input/InputTypes.cpp.inc",
103-
),
104-
(
105-
["--gen-attrdef-decls"],
106-
"include/iree-dialects/Dialect/Input/InputAttrs.h.inc",
107-
),
108-
(
109-
["--gen-attrdef-defs"],
110-
"include/iree-dialects/Dialect/Input/InputAttrs.cpp.inc",
111-
),
112-
(
113-
["--gen-enum-decls"],
114-
"include/iree-dialects/Dialect/Input/InputEnums.h.inc",
115-
),
116-
(
117-
["--gen-enum-defs"],
118-
"include/iree-dialects/Dialect/Input/InputEnums.cpp.inc",
119-
),
120-
],
121-
tblgen = "@llvm-project//mlir:mlir-tblgen",
122-
td_file = "include/iree-dialects/Dialect/Input/InputOps.td",
123-
deps = [":TdFiles"],
124-
)
125-
126-
cc_library(
127-
name = "IREEInputDialect",
128-
srcs = glob([
129-
"lib/Dialect/Input/*.cpp",
130-
]),
131-
hdrs = glob(["include/iree-dialects/Dialect/Input/*.h"]),
132-
includes = ["include"],
133-
deps = [
134-
":IREEInputIncGen",
135-
":IREEInputInterfacesIncGen",
136-
"@llvm-project//llvm:Support",
137-
"@llvm-project//mlir:ArithDialect",
138-
"@llvm-project//mlir:IR",
139-
"@llvm-project//mlir:InferTypeOpInterface",
140-
"@llvm-project//mlir:Support",
141-
"@llvm-project//mlir:TensorDialect",
142-
],
143-
)
144-
145-
gentbl_filegroup(
146-
name = "IREEInputDialectPyGen",
147-
tbl_outs = [
148-
(
149-
[
150-
"--gen-python-op-bindings",
151-
"--bind-dialect=iree",
152-
],
153-
"python/iree/compiler/dialects/_iree_ops_gen.py",
154-
),
155-
],
156-
tblgen = "@llvm-project//mlir:mlir-tblgen",
157-
td_file = "python/iree/compiler/dialects/IreeInputBinding.td",
158-
deps = [
159-
":TdFiles",
160-
],
161-
)
162-
16353
################################################################################
16454
# IREELinalgTransform Dialect
16555
################################################################################
@@ -343,7 +233,6 @@ cc_library(
343233
hdrs = glob(["include/iree-dialects-c/*.h"]),
344234
includes = ["include"],
345235
deps = [
346-
":IREEInputDialect",
347236
":IREELinalgTransformDialect",
348237
":IREELinalgTransformDialectPasses",
349238
"@llvm-project//mlir:CAPIIR",
@@ -387,7 +276,6 @@ cc_binary(
387276
tags = ["hostonly"],
388277
deps = [
389278
":IREEDialectsTest",
390-
":IREEInputDialect",
391279
":IREELinalgTransformDialect",
392280
":IREELinalgTransformDialectPasses",
393281
"@llvm-project//llvm:Support",

llvm-external-projects/iree-dialects/include/iree-dialects-c/Dialects.h

-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
extern "C" {
1616
#endif
1717

18-
//===----------------------------------------------------------------------===//
19-
// IREEDialect
20-
//===----------------------------------------------------------------------===//
21-
22-
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(IREEInput, iree_input);
23-
2418
//===--------------------------------------------------------------------===//
2519
// LinalgTransform
2620
//===--------------------------------------------------------------------===//
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
add_subdirectory(Input)
21
add_subdirectory(LinalgTransform)

llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input/CMakeLists.txt

-44
This file was deleted.

0 commit comments

Comments
 (0)