2021-05-18 15:42:25 -07:00
|
|
|
# This file is 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
|
|
|
|
|
|
|
|
# Description:
|
|
|
|
# The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure
|
|
|
|
|
2023-05-24 09:35:53 -07:00
|
|
|
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
2023-03-17 13:47:46 -07:00
|
|
|
load("@bazel_skylib//rules:write_file.bzl", "write_file")
|
2021-05-18 15:42:25 -07:00
|
|
|
load(":tblgen.bzl", "gentbl_cc_library", "td_library")
|
|
|
|
load(":linalggen.bzl", "genlinalg")
|
2021-11-11 08:34:18 -08:00
|
|
|
load(
|
|
|
|
":build_defs.bzl",
|
|
|
|
"cc_headers_only",
|
|
|
|
"if_cuda_available",
|
|
|
|
"mlir_c_api_cc_library",
|
|
|
|
)
|
2021-05-18 15:42:25 -07:00
|
|
|
|
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
2021-11-15 15:31:08 -08:00
|
|
|
features = ["layering_check"],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2022-09-05 10:43:48 +02:00
|
|
|
licenses(["notice"])
|
|
|
|
|
2022-09-08 07:46:10 +02:00
|
|
|
exports_files([
|
|
|
|
"LICENSE.TXT",
|
|
|
|
"run_lit.sh",
|
2023-01-17 17:16:36 -08:00
|
|
|
"utils/textmate/mlir.json",
|
2022-09-08 07:46:10 +02:00
|
|
|
])
|
2022-09-07 21:57:02 +02:00
|
|
|
|
2023-05-24 09:35:53 -07:00
|
|
|
expand_template(
|
|
|
|
name = "mlir_config_h_gen",
|
|
|
|
out = "include/mlir/Config/mlir-config.h",
|
|
|
|
substitutions = {
|
2023-05-26 14:16:47 -07:00
|
|
|
"#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 0",
|
2023-05-31 08:19:26 +00:00
|
|
|
"#cmakedefine MLIR_GREEDY_REWRITE_RANDOMIZER_SEED ${MLIR_GREEDY_REWRITE_RANDOMIZER_SEED}": "/* #undef MLIR_GREEDY_REWRITE_RANDOMIZER_SEED */",
|
2023-05-26 14:16:47 -07:00
|
|
|
},
|
2023-05-24 09:35:53 -07:00
|
|
|
template = "include/mlir/Config/mlir-config.h.cmake",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "config",
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Config/mlir-config.h",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
filegroup(
|
|
|
|
name = "c_headers",
|
|
|
|
srcs = glob(["include/mlir-c/**/*"]), # <== i.e. match the entire tree
|
|
|
|
)
|
|
|
|
|
2021-07-14 12:09:41 -07:00
|
|
|
exports_files(glob(["include/**/*.td"]))
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
[
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = name + "IncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/IR/" + name + ".h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/IR/" + name + ".cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/" + name + ".td",
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
for name in [
|
|
|
|
"OpAsmInterface",
|
|
|
|
"RegionKindInterface",
|
|
|
|
"SymbolInterfaces",
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TensorEncodingIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-decls"],
|
|
|
|
"include/mlir/IR/TensorEncInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-defs"],
|
|
|
|
"include/mlir/IR/TensorEncInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/TensorEncoding.td",
|
|
|
|
deps = [":TensorOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "BuiltinDialectTdFiles",
|
|
|
|
srcs = [
|
2021-09-21 01:40:45 +00:00
|
|
|
"include/mlir/IR/BuiltinAttributeInterfaces.td",
|
|
|
|
"include/mlir/IR/BuiltinAttributes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/IR/BuiltinDialect.td",
|
|
|
|
"include/mlir/IR/BuiltinLocationAttributes.td",
|
|
|
|
"include/mlir/IR/BuiltinOps.td",
|
|
|
|
"include/mlir/IR/BuiltinTypeInterfaces.td",
|
|
|
|
"include/mlir/IR/BuiltinTypes.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-04-24 11:53:58 -07:00
|
|
|
":BytecodeTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallInterfacesTdFiles",
|
|
|
|
":CastInterfacesTdFiles",
|
|
|
|
":DataLayoutInterfacesTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-06-05 09:57:01 +02:00
|
|
|
td_library(
|
|
|
|
name = "BuiltinDialectBytecodeTdFiles",
|
|
|
|
srcs = ["include/mlir/IR/BuiltinDialectBytecode.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":BytecodeTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinDialectIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/IR/BuiltinDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/IR/BuiltinDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinDialect.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-04-24 11:53:58 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinDialectBytecodeGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
2023-05-04 10:09:53 +02:00
|
|
|
[
|
|
|
|
"-gen-bytecode",
|
|
|
|
"-bytecode-dialect=Builtin",
|
|
|
|
],
|
2023-04-24 11:53:58 -07:00
|
|
|
"include/mlir/IR/BuiltinDialectBytecode.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinDialectBytecode.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attrdef-decls"],
|
|
|
|
"include/mlir/IR/BuiltinAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-defs"],
|
|
|
|
"include/mlir/IR/BuiltinAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinAttributes.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-09-21 01:40:45 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinAttributeInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attr-interface-decls"],
|
|
|
|
"include/mlir/IR/BuiltinAttributeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attr-interface-defs"],
|
|
|
|
"include/mlir/IR/BuiltinAttributeInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinAttributeInterfaces.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinLocationAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attrdef-decls"],
|
|
|
|
"include/mlir/IR/BuiltinLocationAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-defs"],
|
|
|
|
"include/mlir/IR/BuiltinLocationAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinLocationAttributes.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/IR/BuiltinOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/IR/BuiltinOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinOps.td",
|
2022-01-19 14:14:36 +01:00
|
|
|
deps = [
|
|
|
|
":BuiltinDialectTdFiles",
|
|
|
|
":FunctionInterfacesTdFiles",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-typedef-decls"],
|
|
|
|
"include/mlir/IR/BuiltinTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-typedef-defs"],
|
|
|
|
"include/mlir/IR/BuiltinTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinTypes.td",
|
|
|
|
deps = [":BuiltinDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BuiltinTypeInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-type-interface-decls"],
|
|
|
|
"include/mlir/IR/BuiltinTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-type-interface-defs"],
|
|
|
|
"include/mlir/IR/BuiltinTypeInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/BuiltinTypeInterfaces.td",
|
2022-01-19 14:14:36 +01:00
|
|
|
deps = [
|
|
|
|
":BuiltinDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "FunctionInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/IR/FunctionInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "FunctionInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/IR/FunctionOpInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/IR/FunctionOpInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/IR/FunctionInterfaces.td",
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "IR",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/IR/*.cpp",
|
|
|
|
"lib/IR/*.h",
|
2023-06-05 11:45:19 +02:00
|
|
|
"lib/Bytecode/Reader/*.h",
|
|
|
|
"lib/Bytecode/Writer/*.h",
|
|
|
|
"lib/Bytecode/*.h",
|
|
|
|
]) + [
|
|
|
|
"lib/Bytecode/BytecodeOpInterface.cpp",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/IR/*.h",
|
2023-06-05 11:45:19 +02:00
|
|
|
"include/mlir/Bytecode/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]) + [
|
|
|
|
"include/mlir/Interfaces/CallInterfaces.h",
|
|
|
|
"include/mlir/Interfaces/DataLayoutInterfaces.h",
|
|
|
|
"include/mlir/Interfaces/FoldInterfaces.h",
|
2023-03-30 10:10:57 -07:00
|
|
|
"include/mlir/Interfaces/SideEffectInterfaces.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-09-21 01:40:45 +00:00
|
|
|
":BuiltinAttributeInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":BuiltinAttributesIncGen",
|
2023-04-24 11:53:58 -07:00
|
|
|
":BuiltinDialectBytecodeGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":BuiltinDialectIncGen",
|
|
|
|
":BuiltinLocationAttributesIncGen",
|
|
|
|
":BuiltinOpsIncGen",
|
|
|
|
":BuiltinTypeInterfacesIncGen",
|
|
|
|
":BuiltinTypesIncGen",
|
2023-06-05 11:45:19 +02:00
|
|
|
":BytecodeOpInterfaceIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallOpInterfacesIncGen",
|
|
|
|
":DataLayoutInterfacesIncGen",
|
2022-01-19 14:14:36 +01:00
|
|
|
":FunctionInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":InferTypeOpInterfaceIncGen",
|
|
|
|
":OpAsmInterfaceIncGen",
|
|
|
|
":RegionKindInterfaceIncGen",
|
|
|
|
":SideEffectInterfacesIncGen",
|
|
|
|
":Support",
|
|
|
|
":SymbolInterfacesIncGen",
|
|
|
|
":TensorEncodingIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "Pass",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Pass/*.cpp",
|
|
|
|
"lib/Pass/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Pass/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
2022-06-29 20:43:40 +00:00
|
|
|
":Parser",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIIR",
|
|
|
|
srcs = [
|
2022-03-02 00:07:56 +01:00
|
|
|
"lib/CAPI/Dialect/Func.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
"lib/CAPI/IR/AffineExpr.cpp",
|
|
|
|
"lib/CAPI/IR/AffineMap.cpp",
|
|
|
|
"lib/CAPI/IR/BuiltinAttributes.cpp",
|
|
|
|
"lib/CAPI/IR/BuiltinTypes.cpp",
|
|
|
|
"lib/CAPI/IR/Diagnostics.cpp",
|
|
|
|
"lib/CAPI/IR/DialectHandle.cpp",
|
|
|
|
"lib/CAPI/IR/IR.cpp",
|
|
|
|
"lib/CAPI/IR/IntegerSet.cpp",
|
|
|
|
"lib/CAPI/IR/Pass.cpp",
|
|
|
|
"lib/CAPI/IR/Support.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/AffineExpr.h",
|
|
|
|
"include/mlir-c/AffineMap.h",
|
|
|
|
"include/mlir-c/BuiltinAttributes.h",
|
|
|
|
"include/mlir-c/BuiltinTypes.h",
|
|
|
|
"include/mlir-c/Diagnostics.h",
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir-c/Dialect/Func.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir-c/ExecutionEngine.h",
|
|
|
|
"include/mlir-c/IR.h",
|
|
|
|
"include/mlir-c/IntegerSet.h",
|
2021-10-14 17:18:28 +02:00
|
|
|
"include/mlir-c/Interfaces.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir-c/Pass.h",
|
[mlir] Overhaul C/Python registration APIs to properly scope registration/loading activities.
Since the very first commits, the Python and C MLIR APIs have had mis-placed registration/load functionality for dialects, extensions, etc. This was done pragmatically in order to get bootstrapped and then just grew in. Downstreams largely bypass and do their own thing by providing various APIs to register things they need. Meanwhile, the C++ APIs have stabilized around this and it would make sense to follow suit.
The thing we have observed in canonical usage by downstreams is that each downstream tends to have native entry points that configure its installation to its preferences with one-stop APIs. This patch leans in to this approach with `RegisterEverything.h` and `mlir._mlir_libs._mlirRegisterEverything` being the one-stop entry points for the "upstream packages". The `_mlir_libs.__init__.py` now allows customization of the environment and Context by adding "initialization modules" to the `_mlir_libs` package. If present, `_mlirRegisterEverything` is treated as such a module. Others can be added by downstreams by adding a `_site_initialize_{i}.py` module, where '{i}' is a number starting with zero. The number will be incremented and corresponding module loaded until one is not found. Initialization modules can:
* Perform load time customization to the global environment (i.e. registering passes, hooks, etc).
* Define a `register_dialects(registry: DialectRegistry)` function that can extend the `DialectRegistry` that will be used to bootstrap the `Context`.
* Define a `context_init_hook(context: Context)` function that will be added to a list of callbacks which will be invoked after dialect registration during `Context` initialization.
Note that the `MLIRPythonExtension.RegisterEverything` is not included by default when building a downstream (its corresponding behavior was prior). For downstreams which need the default MLIR initialization to take place, they must add this back in to their Python CMake build just like they add their own components (i.e. to `add_mlir_python_common_capi_library` and `add_mlir_python_modules`). It is perfectly valid to not do this, in which case, only the things explicitly depended on and initialized by downstreams will be built/packaged. If the downstream has not been set up for this, it is recommended to simply add this back for the time being and pay the build time/package size cost.
CMake changes:
* `MLIRCAPIRegistration` -> `MLIRCAPIRegisterEverything` (renamed to signify what it does and force an evaluation: a number of places were incidentally linking this very expensive target)
* `MLIRPythonSoure.Passes` removed (without replacement: just drop)
* `MLIRPythonExtension.AllPassesRegistration` removed (without replacement: just drop)
* `MLIRPythonExtension.Conversions` removed (without replacement: just drop)
* `MLIRPythonExtension.Transforms` removed (without replacement: just drop)
Header changes:
* `mlir-c/Registration.h` is deleted. Dialect registration functionality is now in `IR.h`. Registration of upstream features are in `mlir-c/RegisterEverything.h`. When updating MLIR and a couple of downstreams, I found that proper usage was commingled so required making a choice vs just blind S&R.
Python APIs removed:
* mlir.transforms and mlir.conversions (previously only had an __init__.py which indirectly triggered `mlirRegisterTransformsPasses()` and `mlirRegisterConversionPasses()` respectively). Downstream impact: Remove these imports if present (they now happen as part of default initialization).
* mlir._mlir_libs._all_passes_registration, mlir._mlir_libs._mlirTransforms, mlir._mlir_libs._mlirConversions. Downstream impact: None expected (these were internally used).
C-APIs changed:
* mlirRegisterAllDialects(MlirContext) now takes an MlirDialectRegistry instead. It also used to trigger loading of all dialects, which was already marked with a TODO to remove -- it no longer does, and for direct use, dialects must be explicitly loaded. Downstream impact: Direct C-API users must ensure that needed dialects are loaded or call `mlirContextLoadAllAvailableDialects(MlirContext)` to emulate the prior behavior. Also see the `ir.c` test case (e.g. ` mlirContextGetOrLoadDialect(ctx, mlirStringRefCreateFromCString("func"));`).
* mlirDialectHandle* APIs were moved from Registration.h (which now is restricted to just global/upstream registration) to IR.h, arguably where it should have been. Downstream impact: include correct header (likely already doing so).
C-APIs added:
* mlirContextLoadAllAvailableDialects(MlirContext): Corresponds to C++ API with the same purpose.
Python APIs added:
* mlir.ir.DialectRegistry: Mapping for an MlirDialectRegistry.
* mlir.ir.Context.append_dialect_registry(MlirDialectRegistry)
* mlir.ir.Context.load_all_available_dialects()
* mlir._mlir_libs._mlirAllRegistration: New native extension that exposes a `register_dialects(MlirDialectRegistry)` entry point and performs all upstream pass/conversion/transforms registration on init. In this first step, we eagerly load this as part of the __init__.py and use it to monkey patch the Context to emulate prior behavior.
* Type caster and capsule support for MlirDialectRegistry
This should make it possible to build downstream Python dialects that only depend on a subset of MLIR. See: https://github.com/llvm/llvm-project/issues/56037
Here is an example PR, minimally adapting IREE to these changes: https://github.com/iree-org/iree/pull/9638/files In this situation, IREE is opting to not link everything, since it is already configuring the Context to its liking. For projects that would just like to not think about it and pull in everything, add `MLIRPythonExtension.RegisterEverything` to the list of Python sources getting built, and the old behavior will continue.
Reviewed By: mehdi_amini, ftynse
Differential Revision: https://reviews.llvm.org/D128593
2022-07-16 16:09:03 -07:00
|
|
|
"include/mlir-c/RegisterEverything.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir-c/Support.h",
|
|
|
|
"include/mlir/CAPI/AffineExpr.h",
|
|
|
|
"include/mlir/CAPI/AffineMap.h",
|
|
|
|
"include/mlir/CAPI/Diagnostics.h",
|
|
|
|
"include/mlir/CAPI/IR.h",
|
|
|
|
"include/mlir/CAPI/IntegerSet.h",
|
2023-05-11 22:31:09 +00:00
|
|
|
"include/mlir/CAPI/Interfaces.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/CAPI/Pass.h",
|
|
|
|
"include/mlir/CAPI/Registration.h",
|
|
|
|
"include/mlir/CAPI/Support.h",
|
|
|
|
"include/mlir/CAPI/Utils.h",
|
|
|
|
"include/mlir/CAPI/Wrap.h",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
2023-05-01 12:04:32 +02:00
|
|
|
":BytecodeWriter",
|
2021-11-11 08:34:18 -08:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":InferTypeOpInterface",
|
|
|
|
":Parser",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-10-14 17:18:28 +02:00
|
|
|
name = "CAPIInterfaces",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Interfaces/Interfaces.cpp",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-10-14 17:18:28 +02:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-17 14:32:31 +00:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIArith",
|
|
|
|
srcs = ["lib/CAPI/Dialect/Arith.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Dialect/Arith.h"],
|
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArithDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIAsync",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/Async.cpp",
|
|
|
|
"lib/CAPI/Dialect/AsyncPasses.cpp",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
hdrs = ["include/mlir-c/Dialect/Async.h"],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":AsyncPassIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AsyncTransforms",
|
|
|
|
":Pass",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPILinalg",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/Linalg.cpp",
|
|
|
|
"lib/CAPI/Dialect/LinalgPasses.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/Linalg.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":LinalgPassIncGen",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgTransforms",
|
|
|
|
":Pass",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-07-05 22:39:10 +02:00
|
|
|
name = "CAPILLVM",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/LLVM.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/LLVM.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
2021-11-11 08:34:18 -08:00
|
|
|
],
|
2021-07-05 22:39:10 +02:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LLVMDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-17 14:32:31 +00:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIMath",
|
|
|
|
srcs = ["lib/CAPI/Dialect/Math.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Dialect/Math.h"],
|
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":MathDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIMemRef",
|
|
|
|
srcs = ["lib/CAPI/Dialect/MemRef.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Dialect/MemRef.h"],
|
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":MemRefDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIGPU",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/GPU.cpp",
|
|
|
|
"lib/CAPI/Dialect/GPUPasses.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/GPU.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":GPUPassIncGen",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":GPUDialect",
|
|
|
|
":GPUTransforms",
|
|
|
|
":Pass",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPISparseTensor",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/SparseTensor.cpp",
|
|
|
|
"lib/CAPI/Dialect/SparseTensorPasses.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/SparseTensor.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":SparseTensorPassIncGen",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Pass",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SparseTensorTransforms",
|
|
|
|
":Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-03 19:01:07 +01:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIQuant",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/Quant.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/Quant.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
2022-01-03 19:01:07 +01:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":QuantOps",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-13 11:33:42 +01:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIPDL",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/PDL.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/PDL.h",
|
|
|
|
],
|
|
|
|
header_deps = [
|
|
|
|
":CAPIIRHeaders",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLOpsIncGen",
|
|
|
|
":PDLTypesIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-10 14:33:59 +00:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPITransformDialect",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/Transform.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/Transform.h",
|
|
|
|
],
|
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-05 10:55:25 -07:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIMLProgram",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialect/MLProgram.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/Dialect/MLProgram.h",
|
|
|
|
],
|
|
|
|
header_deps = [
|
|
|
|
":CAPIIRHeaders",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
":MLProgramDialect",
|
|
|
|
":MLProgramOpsIncGen",
|
|
|
|
":MLProgramTypesIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-17 14:32:31 +00:00
|
|
|
mlir_c_api_cc_library(
|
|
|
|
name = "CAPIVector",
|
|
|
|
srcs = ["lib/CAPI/Dialect/Vector.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Dialect/Vector.h"],
|
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":VectorDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIConversion",
|
|
|
|
srcs = ["lib/CAPI/Conversion/Passes.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Conversion.h"],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPasses",
|
|
|
|
":Pass",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIDebug",
|
|
|
|
srcs = ["lib/CAPI/Debug/Debug.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Debug.h"],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
2021-11-11 08:34:18 -08:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPIExecutionEngine",
|
|
|
|
srcs = ["lib/CAPI/ExecutionEngine/ExecutionEngine.cpp"],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir-c/ExecutionEngine.h",
|
|
|
|
"include/mlir/CAPI/ExecutionEngine.h",
|
|
|
|
],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":ExecutionEngine",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ExecutionEngineUtils",
|
|
|
|
":LLVMToLLVMIRTranslation",
|
2023-06-05 15:13:32 -07:00
|
|
|
":OpenMPToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:OrcJIT",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
2021-05-18 15:42:25 -07:00
|
|
|
name = "CAPITransforms",
|
|
|
|
srcs = ["lib/CAPI/Transforms/Passes.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/Transforms.h"],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
header_deps = [
|
|
|
|
":TransformsPassIncGen",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
mlir_c_api_cc_library(
|
[mlir] Overhaul C/Python registration APIs to properly scope registration/loading activities.
Since the very first commits, the Python and C MLIR APIs have had mis-placed registration/load functionality for dialects, extensions, etc. This was done pragmatically in order to get bootstrapped and then just grew in. Downstreams largely bypass and do their own thing by providing various APIs to register things they need. Meanwhile, the C++ APIs have stabilized around this and it would make sense to follow suit.
The thing we have observed in canonical usage by downstreams is that each downstream tends to have native entry points that configure its installation to its preferences with one-stop APIs. This patch leans in to this approach with `RegisterEverything.h` and `mlir._mlir_libs._mlirRegisterEverything` being the one-stop entry points for the "upstream packages". The `_mlir_libs.__init__.py` now allows customization of the environment and Context by adding "initialization modules" to the `_mlir_libs` package. If present, `_mlirRegisterEverything` is treated as such a module. Others can be added by downstreams by adding a `_site_initialize_{i}.py` module, where '{i}' is a number starting with zero. The number will be incremented and corresponding module loaded until one is not found. Initialization modules can:
* Perform load time customization to the global environment (i.e. registering passes, hooks, etc).
* Define a `register_dialects(registry: DialectRegistry)` function that can extend the `DialectRegistry` that will be used to bootstrap the `Context`.
* Define a `context_init_hook(context: Context)` function that will be added to a list of callbacks which will be invoked after dialect registration during `Context` initialization.
Note that the `MLIRPythonExtension.RegisterEverything` is not included by default when building a downstream (its corresponding behavior was prior). For downstreams which need the default MLIR initialization to take place, they must add this back in to their Python CMake build just like they add their own components (i.e. to `add_mlir_python_common_capi_library` and `add_mlir_python_modules`). It is perfectly valid to not do this, in which case, only the things explicitly depended on and initialized by downstreams will be built/packaged. If the downstream has not been set up for this, it is recommended to simply add this back for the time being and pay the build time/package size cost.
CMake changes:
* `MLIRCAPIRegistration` -> `MLIRCAPIRegisterEverything` (renamed to signify what it does and force an evaluation: a number of places were incidentally linking this very expensive target)
* `MLIRPythonSoure.Passes` removed (without replacement: just drop)
* `MLIRPythonExtension.AllPassesRegistration` removed (without replacement: just drop)
* `MLIRPythonExtension.Conversions` removed (without replacement: just drop)
* `MLIRPythonExtension.Transforms` removed (without replacement: just drop)
Header changes:
* `mlir-c/Registration.h` is deleted. Dialect registration functionality is now in `IR.h`. Registration of upstream features are in `mlir-c/RegisterEverything.h`. When updating MLIR and a couple of downstreams, I found that proper usage was commingled so required making a choice vs just blind S&R.
Python APIs removed:
* mlir.transforms and mlir.conversions (previously only had an __init__.py which indirectly triggered `mlirRegisterTransformsPasses()` and `mlirRegisterConversionPasses()` respectively). Downstream impact: Remove these imports if present (they now happen as part of default initialization).
* mlir._mlir_libs._all_passes_registration, mlir._mlir_libs._mlirTransforms, mlir._mlir_libs._mlirConversions. Downstream impact: None expected (these were internally used).
C-APIs changed:
* mlirRegisterAllDialects(MlirContext) now takes an MlirDialectRegistry instead. It also used to trigger loading of all dialects, which was already marked with a TODO to remove -- it no longer does, and for direct use, dialects must be explicitly loaded. Downstream impact: Direct C-API users must ensure that needed dialects are loaded or call `mlirContextLoadAllAvailableDialects(MlirContext)` to emulate the prior behavior. Also see the `ir.c` test case (e.g. ` mlirContextGetOrLoadDialect(ctx, mlirStringRefCreateFromCString("func"));`).
* mlirDialectHandle* APIs were moved from Registration.h (which now is restricted to just global/upstream registration) to IR.h, arguably where it should have been. Downstream impact: include correct header (likely already doing so).
C-APIs added:
* mlirContextLoadAllAvailableDialects(MlirContext): Corresponds to C++ API with the same purpose.
Python APIs added:
* mlir.ir.DialectRegistry: Mapping for an MlirDialectRegistry.
* mlir.ir.Context.append_dialect_registry(MlirDialectRegistry)
* mlir.ir.Context.load_all_available_dialects()
* mlir._mlir_libs._mlirAllRegistration: New native extension that exposes a `register_dialects(MlirDialectRegistry)` entry point and performs all upstream pass/conversion/transforms registration on init. In this first step, we eagerly load this as part of the __init__.py and use it to monkey patch the Context to emulate prior behavior.
* Type caster and capsule support for MlirDialectRegistry
This should make it possible to build downstream Python dialects that only depend on a subset of MLIR. See: https://github.com/llvm/llvm-project/issues/56037
Here is an example PR, minimally adapting IREE to these changes: https://github.com/iree-org/iree/pull/9638/files In this situation, IREE is opting to not link everything, since it is already configuring the Context to its liking. For projects that would just like to not think about it and pull in everything, add `MLIRPythonExtension.RegisterEverything` to the list of Python sources getting built, and the old behavior will continue.
Reviewed By: mehdi_amini, ftynse
Differential Revision: https://reviews.llvm.org/D128593
2022-07-16 16:09:03 -07:00
|
|
|
name = "CAPIRegisterEverything",
|
|
|
|
srcs = ["lib/CAPI/RegisterEverything/RegisterEverything.cpp"],
|
|
|
|
hdrs = ["include/mlir-c/RegisterEverything.h"],
|
2022-01-13 01:35:29 +00:00
|
|
|
capi_deps = [
|
|
|
|
":CAPIIR",
|
2021-11-11 08:34:18 -08:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-06-17 02:57:46 +00:00
|
|
|
":AllExtensions",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AllPassesAndDialects",
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# Sources of Python bindings.
|
|
|
|
#----------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
exports_files(
|
|
|
|
glob(["lib/Bindings/Python/**/*.cpp"]),
|
|
|
|
)
|
|
|
|
|
2021-11-11 08:34:18 -08:00
|
|
|
MLIR_BINDINGS_PYTHON_HEADERS = [
|
|
|
|
"lib/Bindings/Python/*.h",
|
|
|
|
"include/mlir-c/Bindings/Python/*.h",
|
|
|
|
"include/mlir/Bindings/Python/*.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MLIRBindingsPythonHeaders",
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Bindings/Python",
|
|
|
|
],
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
|
|
|
|
deps = [
|
|
|
|
":CAPIIRHeaders",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Bindings/Python",
|
|
|
|
],
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-05 11:21:21 +01:00
|
|
|
# These flags are needed for pybind11 to work.
|
|
|
|
PYBIND11_COPTS = [
|
|
|
|
"-fexceptions",
|
|
|
|
"-frtti",
|
|
|
|
]
|
|
|
|
|
|
|
|
PYBIND11_FEATURES = [
|
|
|
|
# Cannot use header_modules (parse_headers feature fails).
|
|
|
|
"-use_header_modules",
|
|
|
|
]
|
|
|
|
|
2021-11-12 12:02:18 -08:00
|
|
|
MLIR_PYTHON_BINDINGS_SOURCES = [
|
|
|
|
"lib/Bindings/Python/IRAffine.cpp",
|
|
|
|
"lib/Bindings/Python/IRAttributes.cpp",
|
|
|
|
"lib/Bindings/Python/IRCore.cpp",
|
|
|
|
"lib/Bindings/Python/IRInterfaces.cpp",
|
|
|
|
"lib/Bindings/Python/IRModule.cpp",
|
|
|
|
"lib/Bindings/Python/IRTypes.cpp",
|
|
|
|
"lib/Bindings/Python/Pass.cpp",
|
|
|
|
]
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2021-11-12 12:02:18 -08:00
|
|
|
name = "MLIRBindingsPythonCore",
|
|
|
|
srcs = MLIR_PYTHON_BINDINGS_SOURCES,
|
2022-01-05 11:21:21 +01:00
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
2021-05-18 15:42:25 -07:00
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
2021-11-11 08:34:18 -08:00
|
|
|
deps = [
|
2021-11-12 12:02:18 -08:00
|
|
|
":CAPIAsync",
|
|
|
|
":CAPIDebug",
|
|
|
|
":CAPIGPU",
|
|
|
|
":CAPIIR",
|
|
|
|
":CAPIInterfaces",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
2021-11-11 08:34:18 -08:00
|
|
|
"//llvm:Support",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2021-11-12 12:02:18 -08:00
|
|
|
name = "MLIRBindingsPythonCoreNoCAPI",
|
|
|
|
srcs = MLIR_PYTHON_BINDINGS_SOURCES,
|
2022-01-05 11:21:21 +01:00
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
2021-11-11 08:34:18 -08:00
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
2021-11-12 12:02:18 -08:00
|
|
|
":CAPIAsyncHeaders",
|
|
|
|
":CAPIDebugHeaders",
|
|
|
|
":CAPIGPUHeaders",
|
|
|
|
":CAPIIRHeaders",
|
|
|
|
":MLIRBindingsPythonHeaders",
|
|
|
|
"//llvm:Support",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
2021-11-11 08:34:18 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-12 12:02:18 -08:00
|
|
|
# Target that bundles together the CAPI objects needed for
|
|
|
|
# MLIRBindingsPythonCoreNoCAPI.
|
2021-11-11 08:34:18 -08:00
|
|
|
cc_library(
|
|
|
|
name = "MLIRBindingsPythonCAPIObjects",
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPIAsyncObjects",
|
|
|
|
":CAPIDebugObjects",
|
|
|
|
":CAPIGPUObjects",
|
|
|
|
":CAPIIRObjects",
|
|
|
|
":CAPIInterfacesObjects",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
# Dynamic library with the MLIR Python extension.
|
|
|
|
cc_binary(
|
|
|
|
name = "_mlir.so",
|
|
|
|
srcs = ["lib/Bindings/Python/MainModule.cpp"],
|
|
|
|
# These flags are needed for pybind11 to work.
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":MLIRBindingsPythonCore",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-05 11:21:21 +01:00
|
|
|
cc_binary(
|
|
|
|
name = "_mlirDialectsLinalg.so",
|
|
|
|
srcs = ["lib/Bindings/Python/DialectLinalg.cpp"],
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
":CAPILinalg",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "_mlirDialectsQuant.so",
|
|
|
|
srcs = ["lib/Bindings/Python/DialectQuant.cpp"],
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
|
|
|
":CAPIQuant",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "_mlirDialectsSparseTensor.so",
|
|
|
|
srcs = ["lib/Bindings/Python/DialectSparseTensor.cpp"],
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPIIR",
|
2022-01-19 14:20:55 +01:00
|
|
|
":CAPISparseTensor",
|
2022-01-05 11:21:21 +01:00
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-29 03:19:14 +00:00
|
|
|
# Dynamic library with the MLIR Conversions Python extension.
|
|
|
|
cc_binary(
|
|
|
|
name = "_mlirExecutionEngine.so",
|
|
|
|
srcs = ["lib/Bindings/Python/ExecutionEngineModule.cpp"],
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPIExecutionEngine",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
# Dynamic library with the MLIR Linalg dialect+passes Python extension.
|
|
|
|
cc_binary(
|
|
|
|
name = "_mlirLinalgPasses.so",
|
|
|
|
srcs = ["lib/Bindings/Python/LinalgPasses.cpp"],
|
|
|
|
copts = PYBIND11_COPTS,
|
|
|
|
features = PYBIND11_FEATURES,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 0,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":CAPILinalg",
|
|
|
|
":MLIRBindingsPythonHeadersAndDeps",
|
|
|
|
"@pybind11",
|
|
|
|
"@python_runtime//:headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
2022-04-15 18:59:03 +00:00
|
|
|
name = "AttrTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = [
|
2022-03-15 09:04:07 +01:00
|
|
|
"include/mlir/IR/AttrTypeBase.td",
|
2021-12-17 02:44:56 +00:00
|
|
|
"include/mlir/IR/EnumAttr.td",
|
2022-04-15 18:59:03 +00:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "OpBaseTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/IR/DialectBase.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/IR/OpAsmInterface.td",
|
|
|
|
"include/mlir/IR/OpBase.td",
|
2022-03-15 09:04:07 +01:00
|
|
|
"include/mlir/IR/PatternBase.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/IR/RegionKindInterface.td",
|
|
|
|
"include/mlir/IR/SymbolInterfaces.td",
|
|
|
|
"include/mlir/IR/TensorEncoding.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
2022-04-15 18:59:03 +00:00
|
|
|
deps = [
|
|
|
|
":AttrTdFiles",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2023-04-24 11:53:58 -07:00
|
|
|
td_library(
|
|
|
|
name = "BytecodeTdFiles",
|
|
|
|
srcs = ["include/mlir/IR/BytecodeBase.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "CallInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/CallInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "CastInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/CastInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ControlFlowInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/ControlFlowInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-05-27 08:37:45 +02:00
|
|
|
td_library(
|
|
|
|
name = "BytecodeOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Bytecode/BytecodeOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "CopyOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/CopyOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "DerivedAttributeOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-10-18 17:23:42 +02:00
|
|
|
td_library(
|
|
|
|
name = "DestinationStyleOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/DestinationStyleOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-06-03 20:43:02 +02:00
|
|
|
td_library(
|
|
|
|
name = "InferIntRangeInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/InferIntRangeInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "InferTypeOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/InferTypeOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "LoopLikeInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/LoopLikeInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-04-27 10:43:13 +02:00
|
|
|
td_library(
|
2023-05-09 10:21:07 +00:00
|
|
|
name = "MemorySlotInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/MemorySlotInterfaces.td"],
|
2023-04-27 10:43:13 +02:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-10-03 13:53:16 +09:00
|
|
|
td_library(
|
|
|
|
name = "ShapedOpInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/ShapedOpInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-07-01 10:33:48 +02:00
|
|
|
td_library(
|
|
|
|
name = "ParallelCombiningOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-12-21 10:51:10 +01:00
|
|
|
td_library(
|
|
|
|
name = "RuntimeVerifiableOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "SideEffectInterfacesTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Interfaces/SideEffectInterfaceBase.td",
|
|
|
|
"include/mlir/Interfaces/SideEffectInterfaces.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-08-30 15:55:30 -07:00
|
|
|
td_library(
|
|
|
|
name = "TilingInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/TilingInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "VectorInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/VectorInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ViewLikeInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/ViewLikeInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ReducerTdFiles",
|
|
|
|
srcs = ["include/mlir/Reducer/Passes.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# Affine dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "PassBaseTdFiles",
|
|
|
|
srcs = ["include/mlir/Pass/PassBase.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "RewritePassBaseTdFiles",
|
|
|
|
srcs = ["include/mlir/Rewrite/PassUtil.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "AffineOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithOpsTdFiles",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LoopLikeInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AffineOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
2021-12-30 20:39:22 +00:00
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=affine",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
2021-12-30 20:39:22 +00:00
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=affine",
|
|
|
|
],
|
2021-06-28 22:54:11 +00:00
|
|
|
"include/mlir/Dialect/Affine/IR/AffineOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td",
|
|
|
|
deps = [":AffineOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AffineMemoryOpInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
|
|
|
|
deps = [":AffineOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-11-21 10:20:19 +01:00
|
|
|
td_library(
|
|
|
|
name = "AffineTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AffineTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":AffineTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AffineTransformOps",
|
|
|
|
srcs = glob(["lib/Dialect/Affine/TransformOps/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Affine/TransformOps/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-01-13 10:23:51 +01:00
|
|
|
":AffineAnalysis",
|
2022-11-21 10:20:19 +01:00
|
|
|
":AffineDialect",
|
|
|
|
":AffineTransformOpsIncGen",
|
|
|
|
":AffineTransforms",
|
|
|
|
":AffineUtils",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":TransformDialect",
|
2023-01-13 10:23:51 +01:00
|
|
|
":Transforms",
|
2022-11-21 10:20:19 +01:00
|
|
|
":VectorDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-30 21:56:19 +00:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# AMDGPU dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "AMDGPUTdFiles",
|
2023-05-04 10:09:53 +02:00
|
|
|
srcs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPU.td"],
|
2022-03-30 21:56:19 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AMDGPUIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
2022-09-01 08:19:50 +02:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-dialect=amdgpu",
|
|
|
|
],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.h.inc",
|
2022-09-01 08:19:50 +02:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-dialect=amdgpu",
|
|
|
|
],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.cpp.inc",
|
2022-09-01 08:19:50 +02:00
|
|
|
),
|
2022-03-30 21:56:19 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=amdgpu",
|
|
|
|
],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h.inc",
|
2022-03-30 21:56:19 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=amdgpu",
|
|
|
|
],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.cpp.inc",
|
2022-03-30 21:56:19 +00:00
|
|
|
),
|
2022-09-01 08:19:50 +02:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.h.inc",
|
2022-09-01 08:19:50 +02:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.cpp.inc",
|
2022-09-01 08:19:50 +02:00
|
|
|
),
|
2022-03-30 21:56:19 +00:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPU.h.inc",
|
2022-03-30 21:56:19 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2023-05-04 10:09:53 +02:00
|
|
|
"include/mlir/Dialect/AMDGPU/IR/AMDGPU.cpp.inc",
|
2022-03-30 21:56:19 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
2023-05-04 10:09:53 +02:00
|
|
|
"g3doc/Dialects/AMDGPU/IR/AMDGPU.md",
|
2022-03-30 21:56:19 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-05-04 10:09:53 +02:00
|
|
|
td_file = "include/mlir/Dialect/AMDGPU/IR/AMDGPU.td",
|
2022-03-30 21:56:19 +00:00
|
|
|
deps = [":AMDGPUTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "AMDGPUDialect",
|
2022-03-30 21:56:19 +00:00
|
|
|
srcs = ["lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp"],
|
2023-05-04 10:09:53 +02:00
|
|
|
hdrs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"],
|
2022-03-30 21:56:19 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMDGPUIncGen",
|
2022-11-21 18:18:25 +01:00
|
|
|
":ArithDialect",
|
2023-02-09 21:35:08 +01:00
|
|
|
":GPUDialect",
|
2022-05-12 13:35:27 +02:00
|
|
|
":IR",
|
2022-03-30 21:56:19 +00:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-04 10:09:53 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AMDGPUPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=AMDGPU",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/AMDGPU/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/AMDGPU/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AMDGPUTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/AMDGPU/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/AMDGPU/Transforms/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/AMDGPU/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMDGPUDialect",
|
|
|
|
":AMDGPUPassIncGen",
|
|
|
|
":AMDGPUUtils",
|
|
|
|
":ArithDialect",
|
|
|
|
":ControlFlowDialect",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AMDGPUUtils",
|
|
|
|
srcs = glob(["lib/Dialect/AMDGPU/Utils/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/AMDGPU/Utils/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMDGPUDialect",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# EmitC dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "EmitCTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitC.td",
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCBase.td",
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCTypes.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-01 11:40:39 +02:00
|
|
|
":BuiltinDialectTdFiles",
|
2022-04-28 18:29:43 +02:00
|
|
|
":CastInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "EmitCAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
|
|
|
|
deps = [":EmitCTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "EmitCOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitC.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitC.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/EmitC/IR/EmitCTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/EmitC/IR/EmitC.td",
|
|
|
|
deps = [":EmitCTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-09-02 10:04:48 -07:00
|
|
|
cc_library(
|
|
|
|
name = "TargetCpp",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Target/Cpp/*.cpp",
|
|
|
|
"lib/Target/Cpp/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Target/Cpp/*.h"]),
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":EmitCDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-09-02 10:04:48 -07:00
|
|
|
":IR",
|
2021-10-12 23:14:57 +00:00
|
|
|
":MathDialect",
|
2021-09-02 10:04:48 -07:00
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
2022-06-09 23:34:57 +00:00
|
|
|
":TranslateLib",
|
2021-09-02 10:31:06 -07:00
|
|
|
"//llvm:Support",
|
2021-09-02 10:04:48 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# Async dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "AsyncOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncDialect.td",
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOps.td",
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncTypes.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-11-02 11:27:26 -07:00
|
|
|
":CallInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-11-02 11:27:26 -07:00
|
|
|
":FunctionInterfacesTdFiles",
|
2022-01-31 12:00:03 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AsyncOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOpsTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/Async/IR/AsyncOpsTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td",
|
|
|
|
deps = [":AsyncOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AsyncPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Async",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Async/Passes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=Async",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Async/Passes.capi.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=Async",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Async/Passes.capi.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Async/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# ArmNeon dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ArmNeonTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/ArmNeon/ArmNeon.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmNeonIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=arm_neon",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmNeon/ArmNeonDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=arm_neon",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmNeon/ArmNeonDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/ArmNeon/ArmNeon.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/ArmNeon/ArmNeon.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
|
|
|
|
deps = [":ArmNeonTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "ArmNeonDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/ArmNeon/ArmNeonDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmNeonIncGen",
|
|
|
|
":IR",
|
|
|
|
":SideEffectInterfaces",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmNeonConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/ArmNeon/ArmNeonConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
|
|
|
|
deps = [":ArmNeonTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ArmNeon2dToIntr",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ArmNeon2dToIntr/*.cpp",
|
|
|
|
"lib/Conversion/ArmNeon2dToIntr/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/ArmNeon2dToIntr/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmNeonDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":OpenACCDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-25 13:36:55 +02:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# ArmSME dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
2023-06-14 23:11:53 +00:00
|
|
|
td_library(
|
|
|
|
name = "ArmSMETdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSME.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArithOpsTdFiles",
|
|
|
|
":FuncTdFiles",
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-25 13:36:55 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmSMETransformsPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=ArmSME",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmSME/Transforms/Passes.h.inc",
|
|
|
|
)],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmSME/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-06-14 23:11:53 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmSMEIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSME.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSME.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSMETypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSMETypes.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=arm_sme",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=arm_sme",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
|
|
|
|
deps = [":ArmSMETdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmSMEConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/ArmSME/IR/ArmSMEConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
|
|
|
|
deps = [":ArmSMETdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ArmSMEDialect",
|
|
|
|
srcs = ["lib/Dialect/ArmSME/IR/ArmSME.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/ArmSME/IR/ArmSME.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSMEIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
2023-07-03 13:16:28 +02:00
|
|
|
":SCFDialect",
|
2023-06-14 23:11:53 +00:00
|
|
|
":SideEffectInterfaces",
|
2023-07-18 15:51:49 +02:00
|
|
|
":VectorDialect",
|
2023-06-14 23:11:53 +00:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-25 11:38:35 +02:00
|
|
|
cc_library(
|
|
|
|
name = "ArmSMEUtils",
|
|
|
|
srcs = glob(["lib/Dialect/ArmSME/Utils/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/ArmSME/Utils/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSMEDialect",
|
|
|
|
":IR",
|
|
|
|
":Dialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-25 13:36:55 +02:00
|
|
|
cc_library(
|
|
|
|
name = "ArmSMETransforms",
|
|
|
|
srcs = glob(["lib/Dialect/ArmSME/Transforms/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/ArmSME/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-07-03 13:16:28 +02:00
|
|
|
":ArithDialect",
|
2023-06-16 13:20:32 +02:00
|
|
|
":ArmSMEDialect",
|
2023-07-25 11:38:35 +02:00
|
|
|
":ArmSMEUtils",
|
2023-05-25 13:36:55 +02:00
|
|
|
":ArmSMETransformsPassIncGen",
|
|
|
|
":FuncDialect",
|
2023-07-03 13:16:28 +02:00
|
|
|
":IR",
|
2023-06-16 13:20:32 +02:00
|
|
|
":LLVMCommonConversion",
|
2023-07-03 13:16:28 +02:00
|
|
|
":LLVMDialect",
|
2023-05-25 13:36:55 +02:00
|
|
|
":Pass",
|
2023-07-03 13:16:28 +02:00
|
|
|
":SCFDialect",
|
2023-07-18 16:10:48 +02:00
|
|
|
":Transforms",
|
2023-07-03 13:16:28 +02:00
|
|
|
":VectorDialect",
|
2023-05-25 13:36:55 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# ArmSVE dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ArmSVETdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVE.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithOpsTdFiles",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmSVEIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVE.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVE.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVETypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVETypes.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=arm_sve",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVEDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=arm_sve",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
|
|
|
|
deps = [":ArmSVETdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "ArmSVEDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/ArmSVE/ArmSVEDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSVEIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ArmSVETransforms",
|
|
|
|
srcs = glob(["lib/Dialect/ArmSVE/Transforms/*.cpp"]),
|
|
|
|
hdrs = ["include/mlir/Dialect/ArmSVE/Transforms.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmSVEDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":TransformUtils",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArmSVEConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/ArmSVE/ArmSVEConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
|
|
|
|
deps = [":ArmSVETdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# AMX dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "AMXTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/AMX/AMX.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AMXIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=amx",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/AMX/AMXDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=amx",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/AMX/AMXDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/AMX/AMX.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/AMX/AMX.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/AMX/AMX.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/AMX/AMX.td",
|
|
|
|
deps = [":AMXTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "AMXDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/Dialect/AMX/IR/AMXDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/AMX/AMXDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMXIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AMXTransforms",
|
|
|
|
srcs = glob(["lib/Dialect/AMX/Transforms/*.cpp"]),
|
|
|
|
hdrs = ["include/mlir/Dialect/AMX/Transforms.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMXDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AMXConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/AMX/AMXConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/AMX/AMX.td",
|
|
|
|
deps = [":AMXTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# X86Vector dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "X86VectorTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/X86Vector/X86Vector.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "X86VectorIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=x86vector",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/X86Vector/X86VectorDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=x86vector",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/X86Vector/X86VectorDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/X86Vector/X86Vector.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/X86Vector/X86Vector.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/X86Vector/X86Vector.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
|
|
|
|
deps = [":X86VectorTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/Dialect/X86Vector/IR/X86VectorDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/X86Vector/X86VectorDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":X86VectorIncGen",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "X86VectorTransforms",
|
|
|
|
srcs = glob(["lib/Dialect/X86Vector/Transforms/*.cpp"]),
|
|
|
|
hdrs = ["include/mlir/Dialect/X86Vector/Transforms.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2023-05-04 14:31:44 -07:00
|
|
|
":VectorUtils",
|
2022-06-13 06:50:55 +00:00
|
|
|
":X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "X86VectorConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/X86Vector/X86VectorConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
|
|
|
|
deps = [":X86VectorTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-04-05 01:07:25 +00:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# IRDL dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "IRDLTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDL.td",
|
2023-07-26 18:11:44 +00:00
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
|
2023-05-17 14:50:01 +02:00
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
|
2023-04-05 01:07:25 +00:00
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLOps.td",
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":InferTypeOpInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
2023-05-04 10:09:53 +02:00
|
|
|
],
|
2023-04-05 01:07:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDL.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDL.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-05-17 14:50:01 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-07-26 18:11:44 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-04-05 01:07:25 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IRDLTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTypesGen.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTypesGen.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
|
|
|
|
deps = [":IRDLTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "IRDLDialect",
|
2023-04-23 23:54:29 +02:00
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/IRDL/IR/IRDL.cpp",
|
2023-05-17 14:50:01 +02:00
|
|
|
"lib/Dialect/IRDL/IR/IRDLOps.cpp",
|
2023-04-23 23:54:29 +02:00
|
|
|
"lib/Dialect/IRDL/IRDLLoading.cpp",
|
2023-05-17 14:50:01 +02:00
|
|
|
"lib/Dialect/IRDL/IRDLVerifiers.cpp",
|
2023-04-23 23:54:29 +02:00
|
|
|
],
|
2023-04-05 01:07:25 +00:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDL.h",
|
2023-05-17 14:50:01 +02:00
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h",
|
2023-04-05 01:07:25 +00:00
|
|
|
"include/mlir/Dialect/IRDL/IR/IRDLTraits.h",
|
2023-04-23 23:54:29 +02:00
|
|
|
"include/mlir/Dialect/IRDL/IRDLLoading.h",
|
2023-05-17 14:50:01 +02:00
|
|
|
"include/mlir/Dialect/IRDL/IRDLVerifiers.h",
|
2023-04-05 01:07:25 +00:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Dialect",
|
|
|
|
":IR",
|
2023-07-26 18:11:44 +00:00
|
|
|
":IRDLAttributesIncGen",
|
|
|
|
":IRDLEnumsIncGen",
|
2023-04-05 01:07:25 +00:00
|
|
|
":IRDLIncGen",
|
2023-05-17 14:50:01 +02:00
|
|
|
":IRDLInterfacesIncGen",
|
2023-04-05 01:07:25 +00:00
|
|
|
":IRDLOpsIncGen",
|
|
|
|
":IRDLTypesIncGen",
|
2023-05-04 10:09:53 +02:00
|
|
|
":InferTypeOpInterface",
|
2023-04-05 01:07:25 +00:00
|
|
|
":Support",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# SCF dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "SCFTdFiles",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
|
|
|
|
"include/mlir/Dialect/SCF/IR/SCFOps.td",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
2023-01-19 13:18:22 -05:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LoopLikeInterfaceTdFiles",
|
2022-07-01 10:33:48 +02:00
|
|
|
":ParallelCombiningOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfacesTdFiles",
|
2022-06-01 12:06:28 +02:00
|
|
|
":ViewLikeInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SCFIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/IR/SCFOps.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/IR/SCFOps.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/IR/SCFOpsDialect.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/IR/SCFOpsDialect.cpp.inc",
|
2021-06-28 22:54:11 +00:00
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-17 15:47:15 +02:00
|
|
|
td_file = "include/mlir/Dialect/SCF/IR/SCFOps.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":SCFTdFiles"],
|
|
|
|
)
|
|
|
|
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SCFDeviceMappingInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-decls"],
|
|
|
|
"include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-defs"],
|
|
|
|
"include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
|
|
|
|
deps = [":SCFTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SCFPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=SCF",
|
|
|
|
],
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/Transforms/Passes.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-17 15:47:15 +02:00
|
|
|
td_file = "include/mlir/Dialect/SCF/Transforms/Passes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/SCF/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/SCF/Transforms/*.h",
|
|
|
|
]),
|
2022-06-17 15:47:15 +02:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/SCF/Transforms/*.h",
|
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-19 00:55:56 +01:00
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2022-10-24 09:17:44 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-08-03 10:21:02 +09:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":SCFPassIncGen",
|
2022-01-27 09:10:59 +01:00
|
|
|
":SCFUtils",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-07-19 14:00:51 -07:00
|
|
|
":Support",
|
2021-08-30 01:12:14 +00:00
|
|
|
":TensorDialect",
|
2022-06-21 16:59:26 +00:00
|
|
|
":TensorTransforms",
|
2022-06-13 19:56:32 +00:00
|
|
|
":TilingInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-06-09 11:10:32 +02:00
|
|
|
td_library(
|
|
|
|
name = "SCFTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":PDLDialect",
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SCFTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":SCFTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFTransformOps",
|
|
|
|
srcs = glob(["lib/Dialect/SCF/TransformOps/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/SCF/TransformOps/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-11-30 10:16:34 -08:00
|
|
|
":AffineUtils",
|
2022-06-09 11:10:32 +02:00
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
2023-07-04 08:57:55 +02:00
|
|
|
":LoopLikeInterface",
|
2022-06-09 11:10:32 +02:00
|
|
|
":SCFDialect",
|
|
|
|
":SCFTransformOpsIncGen",
|
|
|
|
":SCFTransforms",
|
|
|
|
":SCFUtils",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":TransformDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-06-09 11:10:32 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# SparseTensor dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "SparseTensorTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td",
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
|
2022-12-13 19:49:43 +00:00
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SparseTensorAttrDefsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.cpp.inc",
|
|
|
|
),
|
2022-12-13 19:49:43 +00:00
|
|
|
(
|
|
|
|
["--gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
|
|
|
|
deps = [":SparseTensorTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SparseTensorOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=sparse_tensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=sparse_tensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/SparseTensor/SparseTensor.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
|
|
|
|
deps = [":SparseTensorTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-12-13 19:49:43 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SparseTensorTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
|
|
|
|
deps = [":SparseTensorTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SparseTensorPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=SparseTensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SparseTensor/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=SparseTensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=SparseTensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SparseTensor/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-10-17 18:13:05 -07:00
|
|
|
# This library is shared by both SparseTensorDialect and
|
|
|
|
# SparseTensorRuntime, so it must not depend on any of the MLIR/LLVM
|
|
|
|
# internals or else mlir_c_runner_utils will inherit that dependency.
|
|
|
|
cc_library(
|
|
|
|
name = "SparseTensorEnums",
|
2022-10-17 18:33:40 -07:00
|
|
|
hdrs = ["include/mlir/Dialect/SparseTensor/IR/Enums.h"],
|
2022-10-17 18:13:05 -07:00
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "SparseTensorDialect",
|
[mlir][sparse] Start migration to new surface syntax for STEA
We are in the progress of migrating to a much improved surface syntax for the Sparse Tensor Encoding Attribute (STEA).
You can see a preview of this in the StableHLO RFC at
https://github.com/openxla/stablehlo/blob/main/rfcs/20230210-sparsity.md
//**This design is courtesy Wren Romano.**//
This initial revision
(1) Introduces the first version of a new parser written by Wren Romano
(2) Introduces a simple "migration plan" using NEW_SYNTAX on the STEA, which will allow us to test the new parser with new examples, as well as migrate existing examples over without the need to rewrite them all
This first "drop" merely provides the entry points to parse the new syntax. The parser is still under active development. For example, we need to address the "lookahead" issue when parsing the lvl spec (viz. do we see l0 = d0 or a direct d0). Another larger task is to actually implement "affine" parsing (since the MLIR affine parser is not accessible in other parts of the tree).
EXAMPLE:
Currently, CSR looks like
#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense","compressed"],
dimToLvl = affine_map<(i,j) -> (i,j)>
}>
but you can "force" the new parser with
#CSR = #sparse_tensor.encoding<{
NEW_SYNTAX =
(d0, d1) -> (l0 = d0 : dense, l1 = d1 : compressed)
}>
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D153997
2023-06-28 12:54:12 -07:00
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.h",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.h",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.h",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/TemplateExtras.h",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/Var.cpp",
|
|
|
|
"lib/Dialect/SparseTensor/IR/Detail/Var.h",
|
|
|
|
"lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp",
|
|
|
|
],
|
[mlir][sparse] Factoring out SparseTensorType class
This change adds a new `SparseTensorType` class for making the "dim" vs "lvl" distinction more overt, and for abstracting over the differences between sparse-tensors and dense-tensors. In addition, this change also adds new type aliases `Dimension`, `Level`, and `FieldIndex` to make code more self-documenting.
Although the diff is very large, the majority of the changes are mechanical in nature (e.g., changing types to use the new aliases, updating variable names to match, etc). Along the way I also made many variables `const` when they could be; the majority of which required only adding the keyword. A few places had conditional definitions of these variables, requiring actual code changes; however, that was only done when the overall change was extremely local and easy to extract. All these changes are included in the current patch only because it would be too onerous to split them off into a separate patch.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D143800
2023-02-14 18:20:45 -08:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensor.h",
|
2023-05-16 23:52:45 +00:00
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorStorageLayout.h",
|
[mlir][sparse] Factoring out SparseTensorType class
This change adds a new `SparseTensorType` class for making the "dim" vs "lvl" distinction more overt, and for abstracting over the differences between sparse-tensors and dense-tensors. In addition, this change also adds new type aliases `Dimension`, `Level`, and `FieldIndex` to make code more self-documenting.
Although the diff is very large, the majority of the changes are mechanical in nature (e.g., changing types to use the new aliases, updating variable names to match, etc). Along the way I also made many variables `const` when they could be; the majority of which required only adding the keyword. A few places had conditional definitions of these variables, requiring actual code changes; however, that was only done when the overall change was extremely local and easy to extract. All these changes are included in the current patch only because it would be too onerous to split them off into a separate patch.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D143800
2023-02-14 18:20:45 -08:00
|
|
|
"include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
2021-06-25 12:02:08 -07:00
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-07-04 14:03:02 +02:00
|
|
|
":DialectUtils",
|
2021-06-25 12:02:08 -07:00
|
|
|
":IR",
|
2022-04-28 22:51:27 +02:00
|
|
|
":InferTypeOpInterface",
|
2021-06-25 12:02:08 -07:00
|
|
|
":SparseTensorAttrDefsIncGen",
|
2022-10-17 18:13:05 -07:00
|
|
|
":SparseTensorEnums",
|
2021-06-25 12:02:08 -07:00
|
|
|
":SparseTensorOpsIncGen",
|
2022-12-13 19:49:43 +00:00
|
|
|
":SparseTensorTypesIncGen",
|
2021-06-25 12:02:08 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SparseTensorUtils",
|
|
|
|
srcs = glob(["lib/Dialect/SparseTensor/Utils/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/SparseTensor/Utils/*.h"]),
|
|
|
|
includes = ["include"],
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-05-13 17:54:32 -07:00
|
|
|
":ComplexDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2022-04-23 13:06:54 -07:00
|
|
|
":MathDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2022-10-17 19:11:20 -07:00
|
|
|
":SparseTensorEnums",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SparseTensorTransforms",
|
2022-01-04 15:06:28 -08:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/SparseTensor/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/SparseTensor/Transforms/*.h",
|
|
|
|
]),
|
2021-11-05 15:15:39 -07:00
|
|
|
hdrs = [
|
2022-06-24 13:43:30 +02:00
|
|
|
"include/mlir/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.h",
|
2021-11-05 15:15:39 -07:00
|
|
|
"include/mlir/Dialect/SparseTensor/Transforms/Passes.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-01-10 22:35:49 +00:00
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2022-06-24 13:43:30 +02:00
|
|
|
":BufferizationTransforms",
|
2022-05-19 19:33:33 -07:00
|
|
|
":ComplexDialect",
|
2022-09-30 08:33:10 +02:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
2023-04-03 15:46:23 -07:00
|
|
|
":GPUDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-12-22 23:03:23 +00:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":LinalgUtils",
|
2022-11-18 12:18:00 -08:00
|
|
|
":MathDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
2022-01-27 09:10:59 +01:00
|
|
|
":SCFTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2022-10-17 18:13:05 -07:00
|
|
|
":SparseTensorEnums",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SparseTensorPassIncGen",
|
2021-06-24 16:33:13 -07:00
|
|
|
":SparseTensorUtils",
|
2022-07-15 16:41:02 -07:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
2022-11-18 12:18:00 -08:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-26 16:44:32 -08:00
|
|
|
cc_library(
|
|
|
|
name = "SparseTensorPipelines",
|
|
|
|
srcs = glob(["lib/Dialect/SparseTensor/Pipelines/*.cpp"]),
|
|
|
|
hdrs = ["include/mlir/Dialect/SparseTensor/Pipelines/Passes.h"],
|
|
|
|
includes = ["include"],
|
2023-04-05 12:57:23 -07:00
|
|
|
local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
|
2022-01-26 16:44:32 -08:00
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithTransforms",
|
2022-01-26 16:44:32 -08:00
|
|
|
":BufferizationTransforms",
|
|
|
|
":ConversionPasses",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
2023-04-05 12:57:23 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUToNVVMTransforms",
|
|
|
|
":GPUTransforms",
|
2022-01-26 16:44:32 -08:00
|
|
|
":LinalgTransforms",
|
2022-12-02 16:56:05 +01:00
|
|
|
":MemRefTransforms",
|
2023-04-05 12:57:23 -07:00
|
|
|
":NVVMDialect",
|
2022-01-26 16:44:32 -08:00
|
|
|
":Pass",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2022-01-26 16:44:32 -08:00
|
|
|
":SparseTensorTransforms",
|
|
|
|
":TensorTransforms",
|
2022-09-09 15:35:52 -07:00
|
|
|
":Transforms",
|
2022-02-01 14:19:11 -08:00
|
|
|
":VectorToLLVM",
|
2022-02-15 21:16:50 +09:00
|
|
|
":VectorTransforms",
|
2023-04-13 14:58:11 +02:00
|
|
|
] + if_cuda_available([
|
|
|
|
":SerializeToCubin",
|
|
|
|
]),
|
2022-01-26 16:44:32 -08:00
|
|
|
)
|
|
|
|
|
2022-04-07 07:14:39 +00:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# NVGPU dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "NVGPUTdFiles",
|
2022-06-07 10:51:27 -06:00
|
|
|
srcs = ["include/mlir/Dialect/NVGPU/IR/NVGPU.td"],
|
2022-04-07 07:14:39 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "NVGPUIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=nvgpu",
|
|
|
|
],
|
2022-06-07 10:51:27 -06:00
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h.inc",
|
2022-04-07 07:14:39 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=nvgpu",
|
|
|
|
],
|
2022-06-07 10:51:27 -06:00
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUDialect.cpp.inc",
|
2022-04-07 07:14:39 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-06-07 10:51:27 -06:00
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPU.h.inc",
|
2022-04-07 07:14:39 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-06-07 10:51:27 -06:00
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPU.cpp.inc",
|
2022-04-07 07:14:39 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/NVGPU/NVGPU.md",
|
|
|
|
),
|
2022-09-26 09:37:32 +02:00
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUTypes.cpp.inc",
|
|
|
|
),
|
2023-07-21 13:16:31 +02:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.cpp.inc",
|
|
|
|
),
|
2022-04-07 07:14:39 +00:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-07 10:51:27 -06:00
|
|
|
td_file = "include/mlir/Dialect/NVGPU/IR/NVGPU.td",
|
2022-04-07 07:14:39 +00:00
|
|
|
deps = [":NVGPUTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-06-07 10:51:27 -06:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "NVGPUPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=NVGPU",
|
|
|
|
],
|
2023-07-17 10:30:06 +02:00
|
|
|
"include/mlir/Dialect/NVGPU/Transforms/Passes.h.inc",
|
2022-06-07 10:51:27 -06:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-07-17 10:30:06 +02:00
|
|
|
td_file = "include/mlir/Dialect/NVGPU/Transforms/Passes.td",
|
2022-06-07 10:51:27 -06:00
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-07 07:14:39 +00:00
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "NVGPUDialect",
|
2022-04-07 07:14:39 +00:00
|
|
|
srcs = ["lib/Dialect/NVGPU/IR/NVGPUDialect.cpp"],
|
2022-06-07 10:51:27 -06:00
|
|
|
hdrs = ["include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h"],
|
2022-04-07 07:14:39 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-05-09 17:18:21 +00:00
|
|
|
":GPUDialect",
|
2022-04-07 07:14:39 +00:00
|
|
|
":IR",
|
|
|
|
":NVGPUIncGen",
|
2022-06-07 10:51:27 -06:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-06-27 09:02:31 +00:00
|
|
|
cc_library(
|
|
|
|
name = "NVGPUTransformOps",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/NVGPU/TransformOps/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/NVGPU/TransformOps/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-07-03 13:16:28 +02:00
|
|
|
":AffineDialect",
|
2023-07-13 17:55:36 +00:00
|
|
|
":Analysis",
|
2023-06-27 09:02:31 +00:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
|
|
|
":DialectUtils",
|
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
|
|
|
":LinalgDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":NVGPUDialect",
|
|
|
|
":NVGPUTransformOpsIncGen",
|
2023-07-18 14:13:31 +02:00
|
|
|
":NVGPUTransforms",
|
2023-07-13 17:55:36 +00:00
|
|
|
":SCFDialect",
|
|
|
|
":SCFTransforms",
|
2023-06-27 09:02:31 +00:00
|
|
|
":Support",
|
|
|
|
":TransformDialect",
|
|
|
|
":VectorDialect",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "NVGPUTransformOpsTdFiles",
|
|
|
|
srcs = glob([
|
|
|
|
"include/mlir/Dialect/NVGPU/TransformOps/*.td",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "NVGPUTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":NVGPUTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-01-17 15:22:30 -08:00
|
|
|
cc_library(
|
|
|
|
name = "NVGPUUtils",
|
|
|
|
srcs = ["lib/Dialect/NVGPU/Utils/MMAUtils.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/NVGPU/Utils/MMAUtils.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineDialect",
|
|
|
|
":ArithDialect",
|
|
|
|
":IR",
|
|
|
|
":NVGPUDialect",
|
|
|
|
":NVVMDialect",
|
|
|
|
":VectorDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-06-07 10:51:27 -06:00
|
|
|
cc_library(
|
|
|
|
name = "NVGPUTransforms",
|
2023-07-17 10:30:06 +02:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/NVGPU/Transforms/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/NVGPU/Transforms/*.h",
|
|
|
|
]),
|
2022-06-07 10:51:27 -06:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-17 22:40:00 +02:00
|
|
|
":FuncDialect",
|
2022-06-07 10:51:27 -06:00
|
|
|
":GPUDialect",
|
2022-06-17 14:31:44 -04:00
|
|
|
":IR",
|
2022-06-07 10:51:27 -06:00
|
|
|
":MemRefDialect",
|
|
|
|
":NVGPUDialect",
|
2022-06-17 14:31:44 -04:00
|
|
|
":NVGPUPassIncGen",
|
2022-06-07 10:51:27 -06:00
|
|
|
":Pass",
|
2022-04-07 07:14:39 +00:00
|
|
|
":SideEffectInterfaces",
|
2022-06-07 10:51:27 -06:00
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
":VectorDialect",
|
2022-04-07 07:14:39 +00:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
2022-03-02 00:07:56 +01:00
|
|
|
name = "FuncTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = [
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOps.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-04-15 18:59:03 +00:00
|
|
|
":AttrTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallInterfacesTdFiles",
|
|
|
|
":CastInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FunctionInterfacesTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
":VectorInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
2022-03-02 00:07:56 +01:00
|
|
|
name = "FuncIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOps.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOps.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOpsDialect.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOpsDialect.cpp.inc",
|
2021-06-28 22:54:11 +00:00
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOpsEnums.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/FuncOpsEnums.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-03-02 00:07:56 +01:00
|
|
|
td_file = "include/mlir/Dialect/Func/IR/FuncOps.td",
|
|
|
|
deps = [":FuncTdFiles"],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "Dialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/*.cpp",
|
|
|
|
"lib/Dialect/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-09-26 10:33:08 +00:00
|
|
|
td_library(
|
|
|
|
name = "DialectUtilsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Utils/StructuredOpsUtils.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "DialectUtilsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Utils/DialectUtilsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Utils/DialectUtilsEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Utils/StructuredOpsUtils.td",
|
|
|
|
deps = [":DialectUtilsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "DialectUtils",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Utils/*.cpp",
|
|
|
|
"lib/Dialect/Utils/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Utils/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithUtils",
|
2022-09-26 10:33:08 +00:00
|
|
|
":DialectUtilsIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "AffineDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Affine/IR/*.cpp",
|
|
|
|
"lib/Dialect/Affine/IR/*.h",
|
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Affine/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineMemoryOpInterfacesIncGen",
|
|
|
|
":AffineOpsIncGen",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-02-03 01:41:03 +01:00
|
|
|
":ControlFlowInterfaces",
|
2022-08-21 01:01:04 -07:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LoopLikeInterface",
|
|
|
|
":MemRefDialect",
|
2022-10-03 13:53:16 +09:00
|
|
|
":ShapedOpInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
2023-02-10 10:22:18 +01:00
|
|
|
":Support",
|
2023-04-06 10:15:11 +09:00
|
|
|
":ValueBoundsOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "EmitCDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/EmitC/IR/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/EmitC/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":EmitCAttributesIncGen",
|
|
|
|
":EmitCOpsIncGen",
|
|
|
|
":IR",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Async/IR/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Async/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AsyncOpsIncGen",
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":IR",
|
2022-01-31 12:00:03 -08:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AsyncTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Async/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Async/Transforms/*.h",
|
|
|
|
]),
|
2021-12-19 08:35:37 -08:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Async/Passes.h",
|
|
|
|
"include/mlir/Dialect/Async/Transforms.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AsyncPassIncGen",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SCFToControlFlow",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
2022-02-18 01:15:14 +01:00
|
|
|
":Transforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TransformsPassIncGen",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-19 00:55:56 +01:00
|
|
|
cc_library(
|
|
|
|
name = "AffineAnalysis",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Affine/Analysis/*.cpp",
|
|
|
|
"lib/Dialect/Affine/Analysis/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Affine/Analysis/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-01-19 00:55:56 +01:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-01-04 10:56:43 +01:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-01-19 00:55:56 +01:00
|
|
|
":IR",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2022-01-19 00:55:56 +01:00
|
|
|
":Support",
|
2022-03-04 04:20:08 +00:00
|
|
|
":ViewLikeInterface",
|
2022-01-19 00:55:56 +01:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "AffineUtils",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Affine/Utils/*.cpp",
|
|
|
|
"lib/Dialect/Affine/Utils/*.h",
|
|
|
|
],
|
|
|
|
),
|
2022-01-24 21:21:37 -08:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Affine/LoopFusionUtils.h",
|
|
|
|
"include/mlir/Dialect/Affine/LoopUtils.h",
|
|
|
|
"include/mlir/Dialect/Affine/Utils.h",
|
2022-09-23 13:20:10 -04:00
|
|
|
"include/mlir/Dialect/Affine/ViewLikeInterfaceUtils.h",
|
2022-01-24 21:21:37 -08:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-19 00:55:56 +01:00
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithUtils",
|
2023-04-14 20:44:19 +02:00
|
|
|
":DialectUtils",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-12-10 23:50:27 +00:00
|
|
|
":MemRefDialect",
|
2022-01-24 21:21:37 -08:00
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TransformUtils",
|
2022-09-23 13:20:10 -04:00
|
|
|
":ViewLikeInterface",
|
2022-01-24 21:21:37 -08:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AffinePassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Affine",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Affine/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Affine/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AffineTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Affine/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Affine/Transforms/*.h",
|
|
|
|
]),
|
2023-03-14 13:45:53 +01:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Affine/Passes.h",
|
|
|
|
"include/mlir/Dialect/Affine/Transforms/Transforms.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-19 00:55:56 +01:00
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffinePassIncGen",
|
|
|
|
":AffineUtils",
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
2022-01-27 09:10:59 +01:00
|
|
|
":SCFUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
2023-04-06 02:41:15 +02:00
|
|
|
":TensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2023-04-06 02:41:15 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ConversionPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Conversion",
|
|
|
|
],
|
|
|
|
"include/mlir/Conversion/Passes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=Conversion",
|
|
|
|
],
|
|
|
|
"include/mlir/Conversion/Passes.capi.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=Conversion",
|
|
|
|
],
|
|
|
|
"include/mlir/Conversion/Passes.capi.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Conversion/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ConversionPasses",
|
|
|
|
hdrs = ["include/mlir/Conversion/Passes.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-30 21:56:19 +00:00
|
|
|
":AMDGPUToROCDL",
|
2022-05-12 13:35:27 +02:00
|
|
|
":AffineToStandard",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
|
|
|
":ArithToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ArmNeon2dToIntr",
|
|
|
|
":AsyncToLLVM",
|
2021-11-30 13:27:24 +01:00
|
|
|
":BufferizationToMemRef",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexToLLVM",
|
2022-05-13 17:12:11 +02:00
|
|
|
":ComplexToLibm",
|
2023-03-30 08:49:57 -07:00
|
|
|
":ComplexToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexToStandard",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToLLVM",
|
|
|
|
":ControlFlowToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2022-03-03 02:05:11 +00:00
|
|
|
":FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUToGPURuntimeTransforms",
|
|
|
|
":GPUToNVVMTransforms",
|
|
|
|
":GPUToROCDLTransforms",
|
|
|
|
":GPUToSPIRV",
|
|
|
|
":GPUToVulkanTransforms",
|
2022-10-21 12:23:46 -07:00
|
|
|
":IndexToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgToStandard",
|
2022-08-26 09:04:50 +02:00
|
|
|
":MathToFuncs",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MathToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathToLibm",
|
2021-07-29 16:21:43 -04:00
|
|
|
":MathToSPIRV",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-07-29 16:22:46 -04:00
|
|
|
":MemRefToSPIRV",
|
2022-04-15 04:07:46 +00:00
|
|
|
":NVGPUToNVVM",
|
2023-07-11 17:03:48 +02:00
|
|
|
":NVVMToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenACCToLLVM",
|
|
|
|
":OpenACCToSCF",
|
|
|
|
":OpenMPToLLVM",
|
|
|
|
":PDLToPDLInterp",
|
[mlir] Factor type reconciliation out of Standard-to-LLVM conversion
Conversion to the LLVM dialect is being refactored to be more progressive and
is now performed as a series of independent passes converting different
dialects. These passes may produce `unrealized_conversion_cast` operations that
represent pending conversions between built-in and LLVM dialect types.
Historically, a more monolithic Standard-to-LLVM conversion pass did not need
these casts as all operations were converted in one shot. Previous refactorings
have led to the requirement of running the Standard-to-LLVM conversion pass to
clean up `unrealized_conversion_cast`s even though the IR had no standard
operations in it. The pass must have been also run the last among all to-LLVM
passes, in contradiction with the partial conversion logic. Additionally, the
way it was set up could produce invalid operations by removing casts between
LLVM and built-in types even when the consumer did not accept the uncasted
type, or could lead to cryptic conversion errors (recursive application of the
rewrite pattern on `unrealized_conversion_cast` as a means to indicate failure
to eliminate casts).
In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is not
specific to to-LLVM conversions and can be factored out into a separate type
reconciliation pass, which is achieved in this commit. While the cast operation
itself has a folder pattern, it is insufficient in most conversion passes as
the folder only applies to the second cast. Without complex legality setup in
the conversion target, the conversion infra will either consider the cast
operations valid and not fold them (a separate canonicalization would be
necessary to trigger the folding), or consider the first cast invalid upon
generation and stop with error. The pattern provided by the reconciliation pass
applies to the first cast operation instead. Furthermore, having a separate
pass makes it clear when `unrealized_conversion_cast`s could not have been
eliminated since it is the only reason why this pass can fail.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D109507
2021-09-09 16:06:10 +02:00
|
|
|
":ReconcileUnrealizedCasts",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SCFToControlFlow",
|
|
|
|
":SCFToGPU",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SCFToOpenMP",
|
|
|
|
":SCFToSPIRV",
|
|
|
|
":SPIRVToLLVM",
|
|
|
|
":ShapeToStandard",
|
2022-05-11 14:10:12 +02:00
|
|
|
":TensorToLinalg",
|
2022-03-03 02:05:11 +00:00
|
|
|
":TensorToSPIRV",
|
2022-04-04 12:22:09 -07:00
|
|
|
":TosaToArith",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TosaToLinalg",
|
|
|
|
":TosaToSCF",
|
2022-04-04 12:22:09 -07:00
|
|
|
":TosaToTensor",
|
2023-07-24 19:21:18 +02:00
|
|
|
":UBToLLVM",
|
2023-07-24 19:33:33 -07:00
|
|
|
":UBToSPIRV",
|
2023-07-18 16:02:15 +02:00
|
|
|
":VectorToArmSME",
|
2021-05-18 15:42:25 -07:00
|
|
|
":VectorToGPU",
|
|
|
|
":VectorToLLVM",
|
|
|
|
":VectorToSCF",
|
|
|
|
":VectorToSPIRV",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AsyncToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/AsyncToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/AsyncToLLVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob(["include/mlir/Conversion/AsyncToLLVM/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AffineToStandard",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/AffineToStandard/*.cpp",
|
|
|
|
"lib/Conversion/AffineToStandard/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-02-10 10:12:04 +01:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# SDBM dialect only contains attribute components that can be constructed given
|
|
|
|
# a dialect object, so whenever it is used it must also be registered. Therefore
|
|
|
|
# we don't split out the registration library for it.
|
|
|
|
cc_library(
|
|
|
|
name = "SDBM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/SDBM/*.cpp",
|
|
|
|
"lib/Dialect/SDBM/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/SDBM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
2022-06-17 15:47:15 +02:00
|
|
|
"lib/Dialect/SCF/IR/*.cpp",
|
|
|
|
"lib/Dialect/SCF/IR/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
),
|
2022-01-27 09:10:59 +01:00
|
|
|
hdrs = glob(
|
|
|
|
[
|
2022-06-17 15:47:15 +02:00
|
|
|
"include/mlir/Dialect/SCF/IR/*.h",
|
2022-01-27 09:10:59 +01:00
|
|
|
],
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2023-01-19 13:18:22 -05:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LoopLikeInterface",
|
2022-04-23 13:06:54 -07:00
|
|
|
":MemRefDialect",
|
2022-07-01 10:33:48 +02:00
|
|
|
":ParallelCombiningOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
":SCFDeviceMappingInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SCFIncGen",
|
|
|
|
":SCFPassIncGen",
|
|
|
|
":Support",
|
2022-04-23 13:06:54 -07:00
|
|
|
":TensorDialect",
|
2023-04-13 14:58:11 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2022-06-01 12:06:28 +02:00
|
|
|
":ViewLikeInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-27 09:10:59 +01:00
|
|
|
cc_library(
|
|
|
|
name = "SCFUtils",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/SCF/Utils/*.cpp",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"include/mlir/Dialect/SCF/Utils/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-01-27 09:10:59 +01:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-01-27 09:10:59 +01:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-01-27 09:10:59 +01:00
|
|
|
":IR",
|
|
|
|
":SCFDialect",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2022-01-27 09:10:59 +01:00
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-01-20 21:56:25 +01:00
|
|
|
cc_library(
|
|
|
|
name = "InferIntRangeCommon",
|
|
|
|
srcs = [
|
|
|
|
"lib/Interfaces/Utils/InferIntRangeCommon.cpp",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Interfaces/Utils/InferIntRangeCommon.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferIntRangeInterface",
|
2023-01-20 21:58:56 +01:00
|
|
|
"//llvm:Support",
|
2023-01-20 21:56:25 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "DataLayoutInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/DataLayoutInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/DataLayoutInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DataLayoutInterfacesIncGen",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "LoopLikeInterface",
|
|
|
|
srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":LoopLikeInterfaceIncGen",
|
2022-01-24 21:21:37 -08:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-04-27 10:43:13 +02:00
|
|
|
cc_library(
|
2023-05-09 10:21:07 +00:00
|
|
|
name = "MemorySlotInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/MemorySlotInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/MemorySlotInterfaces.h"],
|
2023-04-27 10:43:13 +02:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
2023-05-09 10:21:07 +00:00
|
|
|
":MemorySlotInterfacesIncGen",
|
2023-04-27 10:43:13 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-03 13:53:16 +09:00
|
|
|
cc_library(
|
|
|
|
name = "ShapedOpInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/ShapedOpInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/ShapedOpInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":ShapedOpInterfacesIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-07-01 10:33:48 +02:00
|
|
|
cc_library(
|
|
|
|
name = "ParallelCombiningOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/ParallelCombiningOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":ParallelCombiningOpInterfaceIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-12-21 10:51:10 +01:00
|
|
|
cc_library(
|
|
|
|
name = "RuntimeVerifiableOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/RuntimeVerifiableOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":RuntimeVerifiableOpInterfaceIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VectorInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/VectorInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":VectorInterfacesIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ViewLikeInterface",
|
|
|
|
srcs = ["lib/Interfaces/ViewLikeInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-06-27 08:30:54 -07:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":ViewLikeInterfaceIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "CopyOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/CopyOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CopyOpInterfaceIncGen",
|
|
|
|
":IR",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ShapeOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeBase.td",
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-04-22 11:35:34 -07:00
|
|
|
":CallInterfacesTdFiles",
|
2022-02-08 09:00:03 +01:00
|
|
|
":CastInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-04-22 11:35:34 -07:00
|
|
|
":FunctionInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ShapeOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOpsDialect.cpp.inc",
|
|
|
|
),
|
2022-06-25 09:06:52 -07:00
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOpsTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeOpsTypes.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td",
|
|
|
|
deps = [":ShapeOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MLIRShapeCanonicalizationIncGen",
|
|
|
|
strip_include_prefix = "include/mlir/Dialect/Shape/IR",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
|
|
|
"include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
|
|
|
|
deps = [
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ShapeOpsTdFiles",
|
|
|
|
":TensorOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "ShapeDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]),
|
|
|
|
hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":Dialect",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":MLIRShapeCanonicalizationIncGen",
|
|
|
|
":ShapeOpsIncGen",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":TensorDialect",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ShapeToStandardGen",
|
|
|
|
strip_include_prefix = "lib/Conversion/ShapeToStandard",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
|
|
|
"lib/Conversion/ShapeToStandard/ShapeToStandard.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "lib/Conversion/ShapeToStandard/ShapeToStandard.td",
|
|
|
|
deps = [":ShapeOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ShapeToStandard",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ShapeToStandard/*.cpp",
|
|
|
|
"lib/Conversion/ShapeToStandard/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ShapeDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ShapeToStandardGen",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ShapeTransformsPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Shape",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
|
|
|
|
)],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ShapeTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Shape/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Shape/Transforms/*.h",
|
|
|
|
]),
|
2022-03-07 21:27:53 +09:00
|
|
|
hdrs = [
|
2022-10-03 09:06:42 +02:00
|
|
|
"include/mlir/Dialect/Shape/Analysis/ShapeMappingAnalysis.h",
|
2022-03-07 21:27:53 +09:00
|
|
|
"include/mlir/Dialect/Shape/Transforms/BufferizableOpInterfaceImpl.h",
|
|
|
|
"include/mlir/Dialect/Shape/Transforms/Passes.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ShapeDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ShapeTransformsPassIncGen",
|
2022-10-03 09:06:42 +02:00
|
|
|
":TensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2022-10-03 09:06:42 +02:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-06 17:21:48 -08:00
|
|
|
td_library(
|
|
|
|
name = "ControlFlowOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-04-15 18:59:03 +00:00
|
|
|
":AttrTdFiles",
|
2022-02-06 17:21:48 -08:00
|
|
|
":CallInterfacesTdFiles",
|
|
|
|
":CastInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
|
|
|
":InferTypeOpInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ControlFlowOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
|
2022-04-15 18:59:03 +00:00
|
|
|
deps = [
|
|
|
|
":AttrTdFiles",
|
|
|
|
":ControlFlowOpsTdFiles",
|
|
|
|
],
|
2022-02-06 17:21:48 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-09 23:34:57 +00:00
|
|
|
name = "ControlFlowDialect",
|
2022-02-06 17:21:48 -08:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/ControlFlow/IR/*.cpp",
|
|
|
|
"lib/Dialect/ControlFlow/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/ControlFlow/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-02-06 17:21:48 -08:00
|
|
|
":CommonFolders",
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":ControlFlowOpsIncGen",
|
|
|
|
":IR",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2022-03-02 00:07:56 +01:00
|
|
|
name = "FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob(
|
|
|
|
[
|
2022-03-02 00:07:56 +01:00
|
|
|
"lib/Dialect/Func/IR/*.cpp",
|
|
|
|
"lib/Dialect/Func/IR/*.h",
|
|
|
|
"lib/Dialect/Func/Utils/*.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/IR/*.h",
|
|
|
|
"include/mlir/Dialect/Func/Utils/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]) + ["include/mlir/Transforms/InliningUtils.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallOpInterfaces",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CommonFolders",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-06-09 17:04:41 -07:00
|
|
|
cc_library(
|
|
|
|
name = "FuncExtensions",
|
|
|
|
srcs = glob(["lib/Dialect/Func/Extensions/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Func/Extensions/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowDialect",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AllExtensions",
|
|
|
|
hdrs = ["include/mlir/InitAllExtensions.h"],
|
|
|
|
deps = [
|
|
|
|
":FuncExtensions",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-02 00:07:56 +01:00
|
|
|
# TODO(zinenko): remove this after updating users.
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
2022-03-02 00:07:56 +01:00
|
|
|
name = "FuncTransformsPassIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
2022-03-02 00:07:56 +01:00
|
|
|
"-name=Func",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
2022-03-02 00:07:56 +01:00
|
|
|
"include/mlir/Dialect/Func/Transforms/Passes.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
)],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-03-02 00:07:56 +01:00
|
|
|
td_file = "include/mlir/Dialect/Func/Transforms/Passes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-03-02 00:07:56 +01:00
|
|
|
name = "FuncTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob([
|
2022-03-02 00:07:56 +01:00
|
|
|
"lib/Dialect/Func/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Func/Transforms/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]),
|
2022-03-02 00:07:56 +01:00
|
|
|
hdrs = glob(["include/mlir/Dialect/Func/Transforms/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransformsPassIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-04-23 13:06:54 -07:00
|
|
|
":MemRefDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-13 06:50:55 +00:00
|
|
|
name = "VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob(
|
|
|
|
[
|
2022-01-31 19:10:51 +09:00
|
|
|
"lib/Dialect/Vector/IR/*.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2022-04-13 18:38:11 +00:00
|
|
|
":ControlFlowInterfaces",
|
2023-02-23 12:11:04 +01:00
|
|
|
":DataLayoutInterfaces",
|
2022-10-27 10:59:52 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":DialectUtils",
|
|
|
|
":IR",
|
2022-04-25 09:16:16 +02:00
|
|
|
":InferTypeOpInterface",
|
2022-10-26 00:58:56 +00:00
|
|
|
":MaskableOpInterface",
|
|
|
|
":MaskingOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
|
|
|
":VectorInterfaces",
|
|
|
|
":VectorOpsIncGen",
|
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-06-21 06:52:01 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VectorTransformOps",
|
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/Vector/TransformOps/VectorTransformOps.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineDialect",
|
|
|
|
":ArithDialect",
|
|
|
|
":AsmParser",
|
|
|
|
":IR",
|
2023-03-24 12:09:50 +00:00
|
|
|
":LLVMDialect",
|
2022-06-21 06:52:01 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":TransformDialect",
|
|
|
|
":TransformUtils",
|
2022-11-25 08:13:08 -08:00
|
|
|
":VectorDialect",
|
2023-01-17 13:17:56 +01:00
|
|
|
":VectorEnumsIncGen",
|
2022-11-25 08:13:08 -08:00
|
|
|
":VectorToSCF",
|
|
|
|
":VectorTransformOpsIncGen",
|
|
|
|
":VectorTransforms",
|
|
|
|
":X86VectorTransforms",
|
2022-06-21 06:52:01 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-01-17 13:17:56 +01:00
|
|
|
td_library(
|
|
|
|
name = "VectorTransformsTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "VectorEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td",
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-15 21:16:50 +09:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "VectorPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Vector",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Vector/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Vector/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-01-31 19:10:51 +09:00
|
|
|
cc_library(
|
|
|
|
name = "VectorTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Vector/Transforms/*.cpp",
|
2022-02-15 21:16:50 +09:00
|
|
|
"lib/Dialect/Vector/Transforms/*.h",
|
2022-01-31 19:10:51 +09:00
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Vector/Transforms/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-07-11 14:26:32 -07:00
|
|
|
":ArithTransforms",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithUtils",
|
2022-02-01 00:27:13 +09:00
|
|
|
":BufferizationDialect",
|
2022-02-15 21:16:50 +09:00
|
|
|
":BufferizationTransforms",
|
2022-01-31 19:10:51 +09:00
|
|
|
":DialectUtils",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":MemRefDialect",
|
2023-07-11 14:13:07 -07:00
|
|
|
":MemRefUtils",
|
2022-02-15 21:16:50 +09:00
|
|
|
":Pass",
|
2022-01-31 19:10:51 +09:00
|
|
|
":SCFDialect",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2022-06-06 21:51:11 +00:00
|
|
|
":Support",
|
2022-01-31 19:10:51 +09:00
|
|
|
":TensorDialect",
|
2022-02-15 21:16:50 +09:00
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2023-01-17 13:17:56 +01:00
|
|
|
":VectorEnumsIncGen",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorInterfaces",
|
2022-02-15 21:16:50 +09:00
|
|
|
":VectorPassIncGen",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorUtils",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "VectorUtils",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Vector/Utils/*.cpp",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Vector/Utils/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-11-23 10:45:15 +01:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "Support",
|
2022-03-07 13:04:05 +01:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Support/*.cpp",
|
|
|
|
"lib/Support/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Support/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
2022-12-20 20:09:00 +01:00
|
|
|
deps = [
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TargetParser",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2023-03-06 17:24:26 +01:00
|
|
|
cc_library(
|
|
|
|
name = "Debug",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Debug/*.cpp",
|
|
|
|
"lib/Debug/*.h",
|
2023-04-25 00:53:03 -04:00
|
|
|
"lib/Debug/BreakpointManagers/*.cpp",
|
|
|
|
"lib/Debug/BreakpointManagers/*.h",
|
|
|
|
"lib/Debug/Observers/*.cpp",
|
|
|
|
"lib/Debug/Observers/*.h",
|
2023-03-06 17:24:26 +01:00
|
|
|
]),
|
2023-04-22 13:59:45 +02:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Debug/*.h",
|
2023-04-25 00:53:03 -04:00
|
|
|
"include/mlir/Debug/BreakpointManagers/*.h",
|
|
|
|
"include/mlir/Debug/Observers/*.h",
|
2023-03-20 15:10:12 +01:00
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-04-25 00:53:03 -04:00
|
|
|
":CAPIIR",
|
2023-03-06 17:24:26 +01:00
|
|
|
":IR",
|
2023-04-25 00:53:03 -04:00
|
|
|
":Support",
|
2023-03-06 17:24:26 +01:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-17 09:52:56 +01:00
|
|
|
cc_library(
|
|
|
|
name = "MlirLspServerSupportLib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/lsp-server-support/*.cpp",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
2023-01-28 11:04:57 +01:00
|
|
|
"include/mlir/Tools/lsp-server-support/*.h",
|
2022-03-17 09:52:56 +01:00
|
|
|
],
|
|
|
|
),
|
|
|
|
deps = [
|
|
|
|
":Support",
|
2022-03-17 10:24:59 +01:00
|
|
|
"//llvm:Support",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2022-03-17 09:52:56 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MlirLspServerLib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/mlir-lsp-server/*.cpp",
|
|
|
|
"lib/Tools/mlir-lsp-server/*.h",
|
|
|
|
"lib/Tools/mlir-lsp-server/lsp/*.cpp",
|
|
|
|
"lib/Tools/mlir-lsp-server/lsp/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
["include/mlir/Tools/mlir-lsp-server/*.h"],
|
|
|
|
),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2022-09-03 09:55:20 +02:00
|
|
|
":BytecodeWriter",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-03-17 09:52:56 +01:00
|
|
|
":MlirLspServerSupportLib",
|
2022-09-03 09:55:20 +02:00
|
|
|
":Parser",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-19 17:53:37 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MlirPdllLspServerLib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/mlir-pdll-lsp-server/*.cpp",
|
|
|
|
"lib/Tools/mlir-pdll-lsp-server/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
["include/mlir/Tools/mlir-pdll-lsp-server/*.h"],
|
|
|
|
),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-05-31 10:15:12 +02:00
|
|
|
":IR",
|
2022-03-19 17:53:37 -07:00
|
|
|
":MlirLspServerSupportLib",
|
|
|
|
":PDLLAST",
|
2022-05-31 10:15:12 +02:00
|
|
|
":PDLLCodeGen",
|
2022-03-19 17:53:37 -07:00
|
|
|
":PDLLODS",
|
|
|
|
":PDLLParser",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2022-07-25 20:26:19 -07:00
|
|
|
name = "AsmParserTokenKinds",
|
2021-05-18 15:42:25 -07:00
|
|
|
# strip_include_prefix does not apply to textual_hdrs.
|
2022-07-25 20:26:19 -07:00
|
|
|
hdrs = ["lib/AsmParser/TokenKinds.def"],
|
|
|
|
strip_include_prefix = "lib/AsmParser",
|
|
|
|
textual_hdrs = ["lib/AsmParser/TokenKinds.def"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AsmParser",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/AsmParser/*.cpp",
|
|
|
|
"lib/AsmParser/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/AsmParser/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AsmParserTokenKinds",
|
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2022-07-25 20:26:19 -07:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2022-08-22 12:06:47 +02:00
|
|
|
cc_library(
|
|
|
|
name = "BytecodeReader",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Bytecode/Reader/*.cpp",
|
|
|
|
"lib/Bytecode/Reader/*.h",
|
|
|
|
"lib/Bytecode/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Bytecode/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AsmParser",
|
2023-05-27 08:37:45 +02:00
|
|
|
":BytecodeOpInterfaceIncGen",
|
2022-08-22 12:06:47 +02:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "BytecodeWriter",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Bytecode/Writer/*.cpp",
|
|
|
|
"lib/Bytecode/Writer/*.h",
|
|
|
|
"lib/Bytecode/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Bytecode/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-05-27 08:37:45 +02:00
|
|
|
":BytecodeOpInterfaceIncGen",
|
2022-08-22 12:06:47 +02:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "Parser",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Parser/*.cpp",
|
|
|
|
"lib/Parser/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Parser/*.h",
|
2022-03-07 13:04:05 +01:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2022-08-24 08:51:44 +02:00
|
|
|
":BytecodeReader",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMDialectInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
2023-02-28 09:32:30 +01:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMInterfaces.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
2023-02-28 09:32:30 +01:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMInterfaces.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2021-07-15 18:16:07 +02:00
|
|
|
(
|
|
|
|
["-gen-type-interface-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-02-28 09:32:30 +01:00
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "LLVMDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/LLVMIR/IR/*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*.h",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"lib/Dialect/LLVMIR/IR/*AMX*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*AMX*.h",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*ArmSVE*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*ArmSVE*.h",
|
|
|
|
"lib/Dialect/LLVMIR/IR/NVVM*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/NVVM*.h",
|
|
|
|
"lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/ROCDL*.h",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/IR/*X86Vector*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
["include/mlir/Dialect/LLVMIR/*.h"],
|
|
|
|
exclude = [
|
|
|
|
"include/mlir/Dialect/LLVMIR/*AMX*.h",
|
|
|
|
"include/mlir/Dialect/LLVMIR/*ArmSVE*.h",
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVM*.h",
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDL*.h",
|
|
|
|
"include/mlir/Dialect/LLVMIR/*X86Vector*.h",
|
|
|
|
],
|
2023-04-27 10:43:13 +02:00
|
|
|
) + [
|
|
|
|
"include/mlir/Transforms/InliningUtils.h",
|
|
|
|
"include/mlir/Transforms/Mem2Reg.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-06 08:47:21 +02:00
|
|
|
":CallOpInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":DataLayoutInterfaces",
|
2023-04-27 10:43:13 +02:00
|
|
|
":IR",
|
2023-05-04 10:09:53 +02:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialectInterfaceIncGen",
|
2022-04-13 18:29:47 +02:00
|
|
|
":LLVMIntrinsicOpsIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMOpsIncGen",
|
2022-10-21 12:23:46 -07:00
|
|
|
":LLVMTypesIncGen",
|
2023-05-09 10:21:07 +00:00
|
|
|
":MemorySlotInterfaces",
|
|
|
|
":MemorySlotInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
"//llvm:AsmParser",
|
2022-10-24 09:10:30 +02:00
|
|
|
"//llvm:BinaryFormat",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:BitReader",
|
|
|
|
"//llvm:BitWriter",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=LLVM",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "LLVMIRTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/LLVMIR/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/LLVMIR/Transforms/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-16 12:53:49 +02:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMPassIncGen",
|
2022-06-04 12:33:42 +02:00
|
|
|
":NVVMDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
2022-06-04 12:33:42 +02:00
|
|
|
":Transforms",
|
2023-02-15 08:30:57 +01:00
|
|
|
"//llvm:BinaryFormat",
|
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "GPUOpsTdFiles",
|
|
|
|
srcs = [
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUBase.td",
|
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOps.td",
|
|
|
|
"include/mlir/Dialect/GPU/IR/ParallelLoopMapperAttr.td",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUDeviceMappingAttr.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DLTIDialectTdFiles",
|
|
|
|
":DataLayoutInterfacesTdFiles",
|
2022-01-19 14:14:36 +01:00
|
|
|
":FunctionInterfacesTdFiles",
|
2022-07-04 08:11:30 +02:00
|
|
|
":InferIntRangeInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
":SCFTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUDeviceMapperEnumsGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMappingAttr.td",
|
|
|
|
deps = [
|
|
|
|
":GPUOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpInterfaces.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpInterfaces.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-09 21:33:41 +00:00
|
|
|
td_file = "include/mlir/Dialect/GPU/IR/GPUBase.td",
|
2022-02-23 10:52:24 +01:00
|
|
|
deps = [":OpBaseTdFiles"],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
2022-01-18 22:39:24 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=gpu",
|
|
|
|
],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsDialect.h.inc",
|
2022-01-18 22:39:24 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=gpu",
|
|
|
|
],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsDialect.cpp.inc",
|
2022-01-18 22:39:24 +00:00
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOps.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOps.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2021-11-01 11:43:54 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsEnums.h.inc",
|
2021-11-01 11:43:54 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsEnums.cpp.inc",
|
2021-11-01 11:43:54 -07:00
|
|
|
),
|
2022-01-18 16:53:55 +00:00
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsAttributes.h.inc",
|
2022-01-18 16:53:55 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/IR/GPUOpsAttributes.cpp.inc",
|
2022-01-18 16:53:55 +00:00
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-09 21:33:41 +00:00
|
|
|
td_file = "include/mlir/Dialect/GPU/IR/GPUOps.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
|
|
|
":DLTIDialectTdFiles",
|
|
|
|
":GPUOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/GPU/IR/*.cpp",
|
|
|
|
"lib/Dialect/GPU/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
2022-06-09 21:33:41 +00:00
|
|
|
hdrs = glob(["include/mlir/Dialect/GPU/IR/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":DLTIDialect",
|
|
|
|
":GPUBaseIncGen",
|
|
|
|
":GPUOpsIncGen",
|
|
|
|
":IR",
|
2022-07-04 08:11:30 +02:00
|
|
|
":InferIntRangeInterface",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
":SCFDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=GPU",
|
|
|
|
],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/Transforms/Passes.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=GPU",
|
|
|
|
],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/Transforms/Passes.capi.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=GPU",
|
|
|
|
],
|
2022-06-09 21:33:41 +00:00
|
|
|
"include/mlir/Dialect/GPU/Transforms/Passes.capi.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-06-09 21:33:41 +00:00
|
|
|
td_file = "include/mlir/Dialect/GPU/Transforms/Passes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/GPU/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/GPU/Transforms/*.h",
|
|
|
|
],
|
2023-03-17 13:47:46 -07:00
|
|
|
exclude = [
|
|
|
|
"lib/Dialect/GPU/Transforms/SerializeToCubin.cpp",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2022-06-09 21:33:41 +00:00
|
|
|
hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
2022-11-14 12:21:59 +01:00
|
|
|
local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
2023-03-30 10:10:57 -07:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2022-07-26 16:32:40 +02:00
|
|
|
":AsyncDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-12-16 09:47:41 +00:00
|
|
|
":DLTIDialect",
|
2023-06-05 09:20:08 +02:00
|
|
|
":ExecutionEngineUtils",
|
2023-03-30 10:10:57 -07:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUPassIncGen",
|
2023-03-30 10:10:57 -07:00
|
|
|
":GPUToLLVMIRTranslation",
|
2023-06-05 09:20:08 +02:00
|
|
|
":IR",
|
2023-06-05 09:57:01 +02:00
|
|
|
":IndexDialect",
|
2023-03-30 10:10:57 -07:00
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":MemRefDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
2021-10-12 23:14:57 +00:00
|
|
|
":ROCDLToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SCFDialect",
|
2023-03-17 13:47:46 -07:00
|
|
|
":SerializeToCubin_stub",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
2023-03-30 10:10:57 -07:00
|
|
|
":Transforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
2021-10-15 12:29:48 +02:00
|
|
|
"//llvm:MC",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:Target",
|
|
|
|
] + if_cuda_available([
|
|
|
|
":NVVMToLLVMIRTranslation",
|
|
|
|
"//llvm:NVPTXCodeGen",
|
2023-03-17 13:47:46 -07:00
|
|
|
]),
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SerializeToCubin",
|
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/GPU/Transforms/SerializeToCubin.cpp",
|
|
|
|
],
|
|
|
|
local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
|
|
|
|
deps = [
|
|
|
|
":GPUDialect",
|
|
|
|
":GPUPassIncGen",
|
|
|
|
":GPUTransforms",
|
2023-03-30 10:10:57 -07:00
|
|
|
":NVVMToLLVMIRTranslation",
|
2023-03-17 13:47:46 -07:00
|
|
|
":Pass",
|
|
|
|
":Support",
|
2023-03-30 10:10:57 -07:00
|
|
|
":ToLLVMIRTranslation",
|
2023-03-17 13:47:46 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
] + if_cuda_available([
|
2021-05-18 15:42:25 -07:00
|
|
|
"@cuda//:cuda_headers",
|
|
|
|
"@cuda//:libcuda",
|
2023-03-20 09:28:25 +01:00
|
|
|
]),
|
2023-03-17 13:47:46 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
write_file(
|
|
|
|
name = "SerializeToCubin_stub_cc",
|
|
|
|
out = "SerializeToCubin_stub.cc",
|
|
|
|
content = [
|
2023-03-20 09:28:25 +01:00
|
|
|
"""
|
2023-03-17 13:47:46 -07:00
|
|
|
#include "mlir/Dialect/GPU/Transforms/Passes.h"
|
|
|
|
|
|
|
|
// Provide a weak registration stub in case the real SerializeToCubin is not
|
|
|
|
// linked in.
|
|
|
|
|
2023-03-20 08:28:48 +01:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
// This might not work correctly, but it avoids a compilation error because
|
|
|
|
// MSVC does not support __attribute__((weak)).
|
|
|
|
void mlir::registerGpuSerializeToCubinPass() {}
|
|
|
|
#else
|
2023-03-17 13:47:46 -07:00
|
|
|
__attribute__((weak)) void mlir::registerGpuSerializeToCubinPass() {}
|
2023-03-20 08:28:48 +01:00
|
|
|
#endif
|
2023-03-20 09:28:25 +01:00
|
|
|
""",
|
|
|
|
],
|
2023-03-17 13:47:46 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SerializeToCubin_stub",
|
|
|
|
srcs = [":SerializeToCubin_stub_cc"],
|
|
|
|
hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":GPUDialect",
|
|
|
|
":GPUPassIncGen",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2022-10-03 09:56:42 +02:00
|
|
|
td_library(
|
|
|
|
name = "GPUTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":GPUTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUTransformOps",
|
2023-07-25 00:50:42 +02:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/GPU/TransformOps/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/GPU/TransformOps/*.h",
|
|
|
|
]),
|
2022-10-03 09:56:42 +02:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-03-20 09:28:25 +01:00
|
|
|
":AffineDialect",
|
2022-10-03 09:56:42 +02:00
|
|
|
":ArithDialect",
|
|
|
|
":AsmParser",
|
|
|
|
":ControlFlowDialect",
|
2023-03-20 09:28:25 +01:00
|
|
|
":DialectUtils",
|
|
|
|
":FuncDialect",
|
2022-10-03 09:56:42 +02:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUTransformOpsIncGen",
|
|
|
|
":GPUTransforms",
|
|
|
|
":IR",
|
2023-07-07 14:35:04 +00:00
|
|
|
":MemRefDialect",
|
2022-10-03 09:56:42 +02:00
|
|
|
":Parser",
|
|
|
|
":SCFDialect",
|
|
|
|
":SideEffectInterfaces",
|
2023-03-14 13:54:01 +01:00
|
|
|
":Support",
|
2022-10-03 09:56:42 +02:00
|
|
|
":TransformDialect",
|
|
|
|
":TransformUtils",
|
2023-07-07 14:35:04 +00:00
|
|
|
":VectorDialect",
|
2023-07-25 19:55:58 +02:00
|
|
|
":VectorTransforms",
|
2022-10-03 09:56:42 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "LLVMOpsTdFiles",
|
|
|
|
srcs = [
|
2022-10-17 16:54:37 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td",
|
2023-04-14 11:11:39 +02:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMDialect.td",
|
2022-10-21 16:58:30 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMEnums.td",
|
2023-03-13 08:54:29 +01:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
|
2022-04-13 18:29:47 +02:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOps.td",
|
2022-10-21 12:23:46 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMTypes.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-06 08:47:21 +02:00
|
|
|
":CallInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-10-21 12:23:46 -07:00
|
|
|
":DataLayoutInterfacesTdFiles",
|
2022-01-19 14:14:36 +01:00
|
|
|
":FunctionInterfacesTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2023-05-09 10:21:07 +00:00
|
|
|
":MemorySlotInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUCommonTransforms",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/GPUCommon/GPUOpsLowering.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
2023-07-21 13:51:32 +02:00
|
|
|
"include/mlir/Conversion/GPUCommon/GPUCommonPass.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"lib/Conversion/GPUCommon/GPUOpsLowering.h",
|
|
|
|
"lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h",
|
|
|
|
"lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
|
|
|
|
],
|
|
|
|
deps = [
|
2023-07-21 13:51:32 +02:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
2023-07-21 13:51:32 +02:00
|
|
|
":GPUTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2023-07-21 13:51:32 +02:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUToNVVMGen",
|
|
|
|
strip_include_prefix = "lib/Conversion/GPUToNVVM",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
|
|
|
"lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td",
|
|
|
|
deps = [
|
|
|
|
":GPUOpsTdFiles",
|
|
|
|
":NVVMOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUToNVVMTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/GPUToNVVM/*.cpp",
|
|
|
|
"lib/Conversion/GPUToNVVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/GPUToNVVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithToLLVM",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUCommonTransforms",
|
|
|
|
":GPUDialect",
|
|
|
|
":GPUToNVVMGen",
|
|
|
|
":GPUTransforms",
|
|
|
|
":IR",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":MemRefDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":NVVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-30 21:56:19 +00:00
|
|
|
cc_library(
|
|
|
|
name = "AMDGPUToROCDL",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/AMDGPUToROCDL/*.cpp",
|
|
|
|
"lib/Conversion/AMDGPUToROCDL/*.h",
|
2023-03-28 13:11:47 -07:00
|
|
|
]) + ["include/mlir/Conversion/GPUToROCDL/Runtimes.h"],
|
2022-03-30 21:56:19 +00:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/AMDGPUToROCDL/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMDGPUDialect",
|
2023-05-04 10:09:53 +02:00
|
|
|
":AMDGPUUtils",
|
2022-03-30 21:56:19 +00:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
2022-09-01 08:19:50 +02:00
|
|
|
":LLVMDialect",
|
2022-03-30 21:56:19 +00:00
|
|
|
":Pass",
|
2022-05-12 13:35:27 +02:00
|
|
|
":ROCDLDialect",
|
2022-07-07 17:36:28 -07:00
|
|
|
":Support",
|
2022-03-30 21:56:19 +00:00
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-15 04:07:46 +00:00
|
|
|
cc_library(
|
|
|
|
name = "NVGPUToNVVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/NVGPUToNVVM/*.cpp",
|
|
|
|
"lib/Conversion/NVGPUToNVVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2022-04-15 04:07:46 +00:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/NVGPUToNVVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
2023-07-21 13:51:32 +02:00
|
|
|
":GPUCommonTransforms",
|
2022-05-09 17:18:21 +00:00
|
|
|
":GPUDialect",
|
2023-07-21 13:33:54 +02:00
|
|
|
":GPUToGPURuntimeTransforms",
|
2022-04-15 04:07:46 +00:00
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
2022-11-07 14:21:06 -05:00
|
|
|
":LLVMDialect",
|
2023-07-11 14:26:32 -07:00
|
|
|
":MemRefDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":NVGPUDialect",
|
2022-04-15 04:07:46 +00:00
|
|
|
":NVVMDialect",
|
|
|
|
":Pass",
|
2023-07-21 13:51:32 +02:00
|
|
|
"//llvm:Support",
|
2022-04-15 04:07:46 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VectorToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/VectorToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/VectorToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/VectorToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-03-10 13:54:16 -05:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-02-04 16:51:05 -05:00
|
|
|
":IR",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
2023-03-13 08:54:29 +01:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-02-04 16:51:05 -05:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "GPUToROCDLTGen",
|
|
|
|
strip_include_prefix = "lib/Conversion/GPUToROCDL",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
|
|
|
"lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td",
|
|
|
|
deps = [
|
|
|
|
":GPUOpsTdFiles",
|
|
|
|
":ROCDLOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUToROCDLTransforms",
|
|
|
|
srcs = [
|
2022-08-31 13:31:11 +02:00
|
|
|
"include/mlir/Conversion/GPUToROCDL/Runtimes.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-05-10 15:37:53 +00:00
|
|
|
":AMDGPUToROCDL",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2023-01-22 10:58:47 +01:00
|
|
|
":ControlFlowDialect",
|
2022-02-08 08:48:10 -08:00
|
|
|
":ControlFlowToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUCommonTransforms",
|
|
|
|
":GPUDialect",
|
|
|
|
":GPUToROCDLTGen",
|
|
|
|
":GPUTransforms",
|
2022-04-05 10:14:28 +02:00
|
|
|
":IR",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2023-01-03 00:02:15 +01:00
|
|
|
":LLVMDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathDialect",
|
2023-01-22 10:58:47 +01:00
|
|
|
":MemRefDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":ROCDLDialect",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":VectorToLLVM",
|
|
|
|
":VectorToSCF",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUToVulkanTransforms",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp",
|
|
|
|
"lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVSerialization",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUToGPURuntimeTransforms",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AsyncToLLVM",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToLLVM",
|
2022-02-18 01:15:14 +01:00
|
|
|
":ConversionPassIncGen",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUTransforms",
|
|
|
|
":IR",
|
2021-07-08 21:36:44 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2023-01-20 20:40:06 +01:00
|
|
|
":MemRefDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":VectorToLLVM",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "GPUToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/GPUToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/GPUToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/GPUToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversions/GPUToSPIRV",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
2021-07-29 16:22:46 -04:00
|
|
|
":MemRefToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":SCFToSPIRV",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
":VectorToSPIRV",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "PDLToPDLInterp",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/PDLToPDLInterp/*.cpp",
|
|
|
|
"lib/Conversion/PDLToPDLInterp/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2023-01-19 03:40:59 -08:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Conversion/PDLToPDLInterp/PDLToPDLInterp.h",
|
|
|
|
"lib/Conversion/PDLToPDLInterp/RootOrdering.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLInterpDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/SPIRVToLLVM/*.cpp",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/SPIRVToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVUtils",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc",
|
|
|
|
),
|
2022-10-17 16:54:37 -07:00
|
|
|
(
|
2022-10-21 12:23:46 -07:00
|
|
|
[
|
|
|
|
"--gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=llvm",
|
|
|
|
],
|
2022-10-17 16:54:37 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
2022-10-21 12:23:46 -07:00
|
|
|
[
|
|
|
|
"--gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=llvm",
|
|
|
|
],
|
2022-10-17 16:54:37 -07:00
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
|
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-10-21 12:23:46 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-typedef-decls",
|
|
|
|
"-typedefs-dialect=llvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-typedef-defs",
|
|
|
|
"-typedefs-dialect=llvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMTypes.td",
|
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-13 18:29:47 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMIntrinsicOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
|
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMConversions.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-to-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-from-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc",
|
|
|
|
),
|
2022-10-12 14:07:31 +02:00
|
|
|
(
|
|
|
|
["-gen-op-from-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMOpFromLLVMIRConversions.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
|
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-13 18:29:47 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LLVMIntrinsicConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMIntrinsicConversions.inc",
|
|
|
|
),
|
2022-05-31 13:35:49 +02:00
|
|
|
(
|
2022-10-07 13:49:28 +02:00
|
|
|
["-gen-intr-from-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMIntrinsicFromLLVMIRConversions.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-convertible-llvmir-intrinsics"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/LLVMConvertibleLLVMIRIntrinsics.inc",
|
2022-05-31 13:35:49 +02:00
|
|
|
),
|
2022-04-13 18:29:47 +02:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
|
|
|
|
deps = [":LLVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "NVVMDialect",
|
|
|
|
srcs = ["lib/Dialect/LLVMIR/IR/NVVMDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/LLVMIR/NVVMDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-10-28 14:47:01 +02:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":NVVMOpsIncGen",
|
|
|
|
":SideEffectInterfaces",
|
2023-07-17 18:08:00 +02:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:AsmParser",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "NVVMOpsTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/LLVMIR/NVVMOps.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "NVVMOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-10-27 22:43:10 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsEnums.cpp.inc",
|
|
|
|
),
|
2022-01-18 16:53:55 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc",
|
|
|
|
),
|
2023-07-11 17:03:48 +02:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-decls",
|
|
|
|
"-attrdefs-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-defs",
|
|
|
|
"-attrdefs-dialect=nvvm",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMOpsInterface.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
|
|
|
|
deps = [":NVVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "NVVMConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/NVVMConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
|
|
|
|
deps = [":NVVMOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-07-11 17:03:48 +02:00
|
|
|
cc_library(
|
|
|
|
name = "NVVMToLLVM",
|
|
|
|
srcs = glob(["lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Conversion/NVVMToLLVM/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":FuncDialect",
|
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":NVVMDialect",
|
|
|
|
":NVVMOpsIncGen",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "ROCDLDialect",
|
|
|
|
srcs = ["lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/LLVMIR/ROCDLDialect.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":ROCDLOpsIncGen",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:AsmParser",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "ROCDLOpsTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/LLVMIR/ROCDLOps.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ROCDLOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=rocdl",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=rocdl",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
|
|
|
|
deps = [":ROCDLOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ROCDLConversionIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-llvmir-conversions"],
|
|
|
|
"include/mlir/Dialect/LLVMIR/ROCDLConversions.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
|
|
|
|
deps = [":ROCDLOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "PDLDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/PDL/IR/*.cpp",
|
|
|
|
"lib/Dialect/PDL/IR/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/PDL/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":PDLOpsIncGen",
|
|
|
|
":PDLTypesIncGen",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "PDLDialectTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLDialect.td",
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOps.td",
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLTypes.td",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "PDLOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
|
|
|
|
deps = [":PDLDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "PDLTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/PDL/IR/PDLTypes.td",
|
|
|
|
deps = [":PDLDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "PDLInterpDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/PDLInterp/IR/*.cpp",
|
|
|
|
"lib/Dialect/PDLInterp/IR/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/PDLInterp/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLInterpOpsIncGen",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "PDLInterpOpsTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-15 19:41:33 -07:00
|
|
|
":FunctionInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":PDLDialectTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "PDLInterpOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=pdl_interp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=pdl_interp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
|
|
|
|
deps = [":PDLInterpOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "SPIRVOpsTdFiles",
|
|
|
|
srcs = glob(["include/mlir/Dialect/SPIRV/IR/*.td"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-01 11:40:39 +02:00
|
|
|
":BuiltinDialectTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-01-19 14:14:36 +01:00
|
|
|
":FunctionInterfacesTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/SPIRV/SPIRVOps.md",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-spirv-enum-avail-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-spirv-enum-avail-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-spirv-capability-implication"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVCapabilityImplication.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-06-09 21:35:32 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVCanonicalizationIncGen",
|
|
|
|
strip_include_prefix = "lib/Dialect/SPIRV/IR",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
|
|
|
"lib/Dialect/SPIRV/IR/SPIRVCanonicalization.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVAvailabilityIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-avail-interface-decls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-avail-interface-defs"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-spirv-avail-impls"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVAttrUtilsGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-spirv-attr-utils"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVBase.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVSerializationGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-spirv-serialization"],
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
|
|
|
|
deps = [":SPIRVOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/SPIRV/IR/*.cpp",
|
|
|
|
"lib/Dialect/SPIRV/IR/*.h",
|
|
|
|
]) + ["include/mlir/Transforms/InliningUtils.h"],
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/SPIRV/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CommonFolders",
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":IR",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Parser",
|
|
|
|
":SPIRVAttrUtilsGen",
|
2022-06-09 21:35:32 +00:00
|
|
|
":SPIRVAttributesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SPIRVAvailabilityIncGen",
|
|
|
|
":SPIRVCanonicalizationIncGen",
|
|
|
|
":SPIRVOpsIncGen",
|
|
|
|
":SPIRVSerializationGen",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SPIRVPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=SPIRV",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/SPIRV/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/SPIRV/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVUtils",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/SPIRV/Utils/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/SPIRV/Utils/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":SPIRVDialect",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVConversion",
|
|
|
|
srcs = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SPIRVDialect",
|
|
|
|
":TransformUtils",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/SPIRV/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/SPIRV/Transforms/*.h",
|
|
|
|
],
|
|
|
|
exclude = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
["include/mlir/Dialect/SPIRV/Transforms/*.h"],
|
|
|
|
exclude = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
|
|
|
|
),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVPassIncGen",
|
|
|
|
":SPIRVUtils",
|
2023-01-06 12:51:01 +01:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-10-12 23:14:57 +00:00
|
|
|
cc_library(
|
|
|
|
name = "SPIRVCommonConversion",
|
|
|
|
hdrs = ["lib/Conversion/SPIRVCommon/Pattern.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-03-17 15:00:50 -07:00
|
|
|
":IR",
|
2021-10-12 23:14:57 +00:00
|
|
|
":SPIRVDialect",
|
|
|
|
":Transforms",
|
2022-10-31 15:26:58 -07:00
|
|
|
"//llvm:Support",
|
2021-10-12 23:14:57 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-29 16:21:43 -04:00
|
|
|
cc_library(
|
|
|
|
name = "MathToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/MathToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/MathToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-07-29 16:21:43 -04:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/MathToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/MathToSPIRV",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
2021-10-12 23:14:57 +00:00
|
|
|
":SPIRVCommonConversion",
|
2021-07-29 16:21:43 -04:00
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2022-03-02 21:45:25 +00:00
|
|
|
name = "FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob([
|
2022-03-02 21:45:25 +00:00
|
|
|
"lib/Conversion/FuncToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/FuncToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
2022-03-02 21:45:25 +00:00
|
|
|
"include/mlir/Conversion/FuncToSPIRV/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
2022-03-02 21:45:25 +00:00
|
|
|
"lib/Conversion/FuncToSPIRV",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowToSPIRV",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":MathToSPIRV",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVCommonConversion",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVUtils",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-03-02 21:45:25 +00:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-05-11 14:10:12 +02:00
|
|
|
cc_library(
|
|
|
|
name = "TensorToLinalg",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/TensorToLinalg/*.cpp",
|
|
|
|
"lib/Conversion/TensorToLinalg/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2022-05-11 14:10:12 +02:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/TensorToLinalg/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/TensorToLinalg",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-05-11 14:10:12 +02:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2022-05-11 14:10:12 +02:00
|
|
|
":LinalgTransforms",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-05-11 14:10:12 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-02 21:45:25 +00:00
|
|
|
cc_library(
|
|
|
|
name = "TensorToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/TensorToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/TensorToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2022-03-02 21:45:25 +00:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/TensorToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/TensorToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToSPIRV",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-03 00:18:54 +00:00
|
|
|
":FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-10-12 23:14:57 +00:00
|
|
|
":MathToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
2021-10-12 23:14:57 +00:00
|
|
|
":SPIRVCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVUtils",
|
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVBinaryUtils",
|
|
|
|
srcs = ["lib/Target/SPIRV/SPIRVBinaryUtils.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/SPIRV/SPIRVBinaryUtils.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":SPIRVAttrUtilsGen",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVOpsIncGen",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVSerialization",
|
|
|
|
srcs = [
|
|
|
|
"lib/Target/SPIRV/Serialization/Serialization.cpp",
|
|
|
|
"lib/Target/SPIRV/Serialization/SerializeOps.cpp",
|
|
|
|
"lib/Target/SPIRV/Serialization/Serializer.cpp",
|
|
|
|
"lib/Target/SPIRV/Serialization/Serializer.h",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Target/SPIRV/Serialization.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":SPIRVAttrUtilsGen",
|
|
|
|
":SPIRVBinaryUtils",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVOpsIncGen",
|
|
|
|
":SPIRVSerializationGen",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVDeserialization",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Target/SPIRV/Deserialization/*.cpp",
|
|
|
|
"lib/Target/SPIRV/Deserialization/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = ["include/mlir/Target/SPIRV/Deserialization.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":SPIRVAttrUtilsGen",
|
|
|
|
":SPIRVBinaryUtils",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVOpsIncGen",
|
|
|
|
":SPIRVSerializationGen",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVModuleCombiner",
|
|
|
|
srcs = glob(
|
|
|
|
["lib/Dialect/SPIRV/Linking/ModuleCombiner/*.cpp"],
|
|
|
|
),
|
|
|
|
hdrs = ["include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SPIRVTranslateRegistration",
|
|
|
|
srcs = ["lib/Target/SPIRV/TranslateRegistration.cpp"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Parser",
|
|
|
|
":SPIRVDeserialization",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVSerialization",
|
|
|
|
":Support",
|
2022-06-09 23:34:57 +00:00
|
|
|
":TranslateLib",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "TensorOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorBase.td",
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CastInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-10-27 10:27:11 +02:00
|
|
|
":DestinationStyleOpInterfaceTdFiles",
|
2021-07-13 14:51:20 -07:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
2022-06-30 04:27:41 -07:00
|
|
|
":ParallelCombiningOpInterfaceTdFiles",
|
2022-10-03 13:53:16 +09:00
|
|
|
":ShapedOpInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfacesTdFiles",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TilingInterfaceTdFiles",
|
2021-06-23 09:25:36 -07:00
|
|
|
":ViewLikeInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TensorOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=tensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=tensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Tensor/IR/TensorOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tensor/IR/TensorOps.td",
|
|
|
|
deps = [":TensorOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TensorDialect",
|
2021-12-10 12:03:47 +01:00
|
|
|
srcs = [
|
|
|
|
"include/mlir/Transforms/InliningUtils.h",
|
|
|
|
"lib/Dialect/Tensor/IR/TensorDialect.cpp",
|
|
|
|
"lib/Dialect/Tensor/IR/TensorOps.cpp",
|
2023-04-06 02:41:15 +02:00
|
|
|
"lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Tensor/IR/Tensor.h",
|
|
|
|
"include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h",
|
2021-12-10 12:03:47 +01:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-10-04 17:06:00 +09:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2022-01-28 08:20:24 +01:00
|
|
|
":ComplexDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
2022-10-24 09:17:44 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-06-27 08:30:54 -07:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-13 14:51:20 -07:00
|
|
|
":InferTypeOpInterface",
|
2022-06-30 04:27:41 -07:00
|
|
|
":ParallelCombiningOpInterface",
|
2022-10-03 13:53:16 +09:00
|
|
|
":ShapedOpInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
2022-11-22 10:46:52 +01:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TensorOpsIncGen",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TilingInterface",
|
2023-04-06 02:41:15 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2021-06-23 09:25:36 -07:00
|
|
|
":ViewLikeInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-12-10 12:03:47 +01:00
|
|
|
cc_library(
|
|
|
|
name = "TensorInferTypeOpInterfaceImpl",
|
|
|
|
srcs = ["lib/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2023-03-01 08:10:49 -08:00
|
|
|
":ArithUtils",
|
2022-09-27 11:16:43 -04:00
|
|
|
":DialectUtils",
|
2021-12-10 12:03:47 +01:00
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":TensorDialect",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-21 19:29:08 +01:00
|
|
|
cc_library(
|
|
|
|
name = "TensorTilingInterfaceImpl",
|
|
|
|
srcs = ["lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Tensor/IR/TensorTilingInterfaceImpl.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-11-23 18:07:12 -08:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithUtils",
|
2022-11-23 18:07:12 -08:00
|
|
|
":DialectUtils",
|
2022-01-21 19:29:08 +01:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
[mlir][tensor] Implement TilingInterface for unpack op
The main issue of tiling unpack op is about incomplete tile. Since all
the dimensions are orthogonal, discussing 1-d unpack case is enough. The
core idea is to make the input slice have complete tiles. In this case,
a larger unpacked tile will be created. We'll need an extract_slice op
to shift and truncate the output.
Take Nn_to_N as an example. Say that N=32, n=8, and tiling_size=15. The
coordinates of second tile (i.e., result[15..31]) are [(1, 7), (2, 0,),
(2, 1) ... (3, 6), (3, 7)]. The first row and the last row are
incomplete in terms of inputs. It's impossible to represent an unpack op
using the coordinates. Because the input has higher rank and the math
computation of coordinate is using mod and ceilDiv. That's very tricky.
To represent the unpack op, we have to complete the rows. I.e., the
input coordinates would start with (1, 0); end with (3, 7). In this
context, the tiled unpack produces a (3 * n) elements because there are
3 rows in total. Follow by a tensor.extract_slice op, we can get the
actual result.
If the tiling sizes are multiple of inner tile sizes, it is a perfect
tiling case. In this context, the larger input and output is not needed.
Reviewed By: chelini
Differential Revision: https://reviews.llvm.org/D139362
2022-12-02 13:25:48 -08:00
|
|
|
":LinalgUtils",
|
2022-01-21 19:29:08 +01:00
|
|
|
":SCFDialect",
|
|
|
|
":TensorDialect",
|
2022-11-23 18:07:12 -08:00
|
|
|
":TensorUtils",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TilingInterface",
|
2023-04-13 14:58:11 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2022-01-21 19:29:08 +01:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TensorUtils",
|
|
|
|
srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Tensor/Utils/Utils.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-03-21 14:41:20 -07:00
|
|
|
":ArithUtils",
|
2023-02-27 01:28:56 -08:00
|
|
|
":DialectUtils",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TensorDialect",
|
2023-06-01 08:47:00 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2022-01-21 19:29:08 +01:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TensorPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Tensor",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tensor/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tensor/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TensorTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Tensor/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Tensor/Transforms/*.h",
|
|
|
|
],
|
|
|
|
),
|
2022-01-24 23:16:29 +09:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.h",
|
|
|
|
"include/mlir/Dialect/Tensor/Transforms/Passes.h",
|
2022-09-19 21:20:12 +02:00
|
|
|
"include/mlir/Dialect/Tensor/Transforms/TransformUtils.h",
|
2022-02-16 11:26:47 -05:00
|
|
|
"include/mlir/Dialect/Tensor/Transforms/Transforms.h",
|
2022-01-24 23:16:29 +09:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-23 11:38:54 +02:00
|
|
|
":AffineDialect",
|
2023-04-28 10:34:03 +09:00
|
|
|
":AffineTransforms",
|
2022-09-23 13:20:10 -04:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2022-02-16 11:26:47 -05:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-10-27 11:54:01 +02:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":TensorDialect",
|
|
|
|
":TensorPassIncGen",
|
2023-06-01 08:47:00 +02:00
|
|
|
":TensorUtils",
|
2022-06-21 16:59:26 +00:00
|
|
|
":TilingInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2023-04-28 10:34:03 +09:00
|
|
|
":ValueBoundsOpInterface",
|
2023-03-21 14:41:20 -07:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-04-28 10:34:03 +09:00
|
|
|
td_library(
|
|
|
|
name = "TensorTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TensorTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":TensorTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-03-29 11:02:26 +02:00
|
|
|
cc_library(
|
|
|
|
name = "TensorTransformOps",
|
|
|
|
srcs = glob(["lib/Dialect/Tensor/TransformOps/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Tensor/TransformOps/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-04-28 10:34:03 +09:00
|
|
|
":AffineDialect",
|
2023-03-29 11:02:26 +02:00
|
|
|
":IR",
|
2023-04-28 10:34:03 +09:00
|
|
|
":SCFDialect",
|
2023-03-29 11:02:26 +02:00
|
|
|
":TensorDialect",
|
2023-04-28 10:34:03 +09:00
|
|
|
":TensorTransformOpsIncGen",
|
|
|
|
":TensorTransforms",
|
2023-06-01 08:47:00 +02:00
|
|
|
":TensorUtils",
|
2023-03-29 11:02:26 +02:00
|
|
|
":TransformDialect",
|
2023-05-25 19:10:05 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2023-03-29 11:02:26 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "Rewrite",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Rewrite/*.cpp",
|
|
|
|
"lib/Rewrite/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Rewrite/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
|
|
|
":IR",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLInterpDialect",
|
|
|
|
":PDLToPDLInterp",
|
|
|
|
":Pass",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TransformUtils",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Transforms/Utils/*.cpp",
|
|
|
|
"lib/Transforms/Utils/*.h",
|
|
|
|
]),
|
2022-02-11 07:14:40 +00:00
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"include/mlir/Transforms/*.h",
|
|
|
|
],
|
|
|
|
exclude = ["include/mlir/Transforms/Passes.h"],
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":IR",
|
2022-04-16 00:36:22 +00:00
|
|
|
":LoopLikeInterface",
|
2023-05-09 10:21:07 +00:00
|
|
|
":MemorySlotInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Rewrite",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
":TransformsPassIncGen",
|
2023-05-26 14:16:47 -07:00
|
|
|
":config",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "DerivedAttributeOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td",
|
|
|
|
deps = [":DerivedAttributeOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "DerivedAttributeOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/DerivedAttributeOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DerivedAttributeOpInterfaceIncGen",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-18 17:23:42 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "DestinationStyleOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/DestinationStyleOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/DestinationStyleOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/DestinationStyleOpInterface.td",
|
|
|
|
deps = [":DestinationStyleOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "DestinationStyleOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/DestinationStyleOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/DestinationStyleOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DestinationStyleOpInterfaceIncGen",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-06-03 20:43:02 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "InferIntRangeInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/InferIntRangeInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/InferIntRangeInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/InferIntRangeInterface.td",
|
|
|
|
deps = [":InferIntRangeInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "InferIntRangeInterface",
|
|
|
|
srcs = ["lib/Interfaces/InferIntRangeInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/InferIntRangeInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferIntRangeInterfaceIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "DataLayoutInterfacesTdFiles",
|
|
|
|
srcs = ["include/mlir/Interfaces/DataLayoutInterfaces.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "DataLayoutInterfacesIncGen",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutAttrInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attr-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutAttrInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutTypeInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/DataLayoutTypeInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/DataLayoutInterfaces.td",
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LoopLikeInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/LoopLikeInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/LoopLikeInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/LoopLikeInterface.td",
|
|
|
|
deps = [":LoopLikeInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-04-27 10:43:13 +02:00
|
|
|
gentbl_cc_library(
|
2023-05-09 10:21:07 +00:00
|
|
|
name = "MemorySlotInterfacesIncGen",
|
2023-04-27 10:43:13 +02:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
2023-05-09 10:21:07 +00:00
|
|
|
"include/mlir/Interfaces/MemorySlotOpInterfaces.h.inc",
|
2023-04-27 10:43:13 +02:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
2023-05-09 10:21:07 +00:00
|
|
|
"include/mlir/Interfaces/MemorySlotOpInterfaces.cpp.inc",
|
2023-04-27 10:43:13 +02:00
|
|
|
),
|
2023-05-22 13:07:45 +02:00
|
|
|
(
|
|
|
|
["-gen-type-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/MemorySlotTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/MemorySlotTypeInterfaces.cpp.inc",
|
|
|
|
),
|
2023-04-27 10:43:13 +02:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-05-09 10:21:07 +00:00
|
|
|
td_file = "include/mlir/Interfaces/MemorySlotInterfaces.td",
|
|
|
|
deps = [":MemorySlotInterfacesTdFiles"],
|
2023-04-27 10:43:13 +02:00
|
|
|
)
|
|
|
|
|
2022-10-03 13:53:16 +09:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ShapedOpInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/ShapedOpInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/ShapedOpInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/ShapedOpInterfaces.td",
|
|
|
|
deps = [":ShapedOpInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-07-01 10:33:48 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ParallelCombiningOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/ParallelCombiningOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/ParallelCombiningOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/ParallelCombiningOpInterface.td",
|
|
|
|
deps = [":ParallelCombiningOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-12-21 10:51:10 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "RuntimeVerifiableOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/RuntimeVerifiableOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/RuntimeVerifiableOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/RuntimeVerifiableOpInterface.td",
|
|
|
|
deps = [":RuntimeVerifiableOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "VectorInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/VectorInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/VectorInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/VectorInterfaces.td",
|
|
|
|
deps = [":VectorInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ViewLikeInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/ViewLikeInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/ViewLikeInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/ViewLikeInterface.td",
|
|
|
|
deps = [":ViewLikeInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "CopyOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/CopyOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/CopyOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/CopyOpInterface.td",
|
|
|
|
deps = [":CopyOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformsPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Transforms",
|
|
|
|
],
|
|
|
|
"include/mlir/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=Transforms",
|
|
|
|
],
|
|
|
|
"include/mlir/Transforms/Transforms.capi.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=Transforms",
|
|
|
|
],
|
|
|
|
"include/mlir/Transforms/Transforms.capi.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Transforms/Passes.td",
|
|
|
|
deps = [
|
|
|
|
":PassBaseTdFiles",
|
|
|
|
":RewritePassBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "Transforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Transforms/*.cpp",
|
|
|
|
"lib/Transforms/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":IR",
|
|
|
|
":LoopLikeInterface",
|
2023-05-09 10:21:07 +00:00
|
|
|
":MemorySlotInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":Rewrite",
|
2022-12-21 10:51:10 +01:00
|
|
|
":RuntimeVerifiableOpInterface",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":TransformsPassIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "CommonFolders",
|
|
|
|
srcs = [
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Dialect/CommonFolders.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFToGPU",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/SCFToGPU/*.cpp"]),
|
2022-06-09 23:34:57 +00:00
|
|
|
hdrs = glob(["include/mlir/Conversion/SCFToGPU/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffineToStandard",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ComplexDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUTransforms",
|
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/SCFToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/SCFToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/SCFToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-29 16:22:46 -04:00
|
|
|
":MemRefToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SCFToOpenMP",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp",
|
|
|
|
],
|
|
|
|
hdrs = ["include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-19 00:55:56 +01:00
|
|
|
":AffineAnalysis",
|
2021-09-22 17:11:45 +00:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-08-25 11:07:17 +02:00
|
|
|
":LLVMDialect",
|
2022-03-01 10:43:27 -08:00
|
|
|
":MemRefDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenMPDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-02-06 17:21:48 -08:00
|
|
|
name = "SCFToControlFlow",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = [
|
2022-02-06 17:21:48 -08:00
|
|
|
"lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
2022-02-06 17:21:48 -08:00
|
|
|
hdrs = ["include/mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-07 16:50:23 -07:00
|
|
|
cc_library(
|
|
|
|
name = "LLVMCommonConversion",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/LLVMCommon/*.cpp",
|
|
|
|
]) + ["lib/Conversion/LLVMCommon/MemRefDescriptor.h"],
|
|
|
|
hdrs = glob(["include/mlir/Conversion/LLVMCommon/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
[mlir] Factor type reconciliation out of Standard-to-LLVM conversion
Conversion to the LLVM dialect is being refactored to be more progressive and
is now performed as a series of independent passes converting different
dialects. These passes may produce `unrealized_conversion_cast` operations that
represent pending conversions between built-in and LLVM dialect types.
Historically, a more monolithic Standard-to-LLVM conversion pass did not need
these casts as all operations were converted in one shot. Previous refactorings
have led to the requirement of running the Standard-to-LLVM conversion pass to
clean up `unrealized_conversion_cast`s even though the IR had no standard
operations in it. The pass must have been also run the last among all to-LLVM
passes, in contradiction with the partial conversion logic. Additionally, the
way it was set up could produce invalid operations by removing casts between
LLVM and built-in types even when the consumer did not accept the uncasted
type, or could lead to cryptic conversion errors (recursive application of the
rewrite pattern on `unrealized_conversion_cast` as a means to indicate failure
to eliminate casts).
In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is not
specific to to-LLVM conversions and can be factored out into a separate type
reconciliation pass, which is achieved in this commit. While the cast operation
itself has a folder pattern, it is insufficient in most conversion passes as
the folder only applies to the second cast. Without complex legality setup in
the conversion target, the conversion infra will either consider the cast
operations valid and not fold them (a separate canonicalization would be
necessary to trigger the folding), or consider the first cast invalid upon
generation and stop with error. The pattern provided by the reconciliation pass
applies to the first cast operation instead. Furthermore, having a separate
pass makes it clear when `unrealized_conversion_cast`s could not have been
eliminated since it is the only reason why this pass can fail.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D109507
2021-09-09 16:06:10 +02:00
|
|
|
cc_library(
|
|
|
|
name = "ReconcileUnrealizedCasts",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/ReconcileUnrealizedCasts/*.cpp"]),
|
[mlir] Factor type reconciliation out of Standard-to-LLVM conversion
Conversion to the LLVM dialect is being refactored to be more progressive and
is now performed as a series of independent passes converting different
dialects. These passes may produce `unrealized_conversion_cast` operations that
represent pending conversions between built-in and LLVM dialect types.
Historically, a more monolithic Standard-to-LLVM conversion pass did not need
these casts as all operations were converted in one shot. Previous refactorings
have led to the requirement of running the Standard-to-LLVM conversion pass to
clean up `unrealized_conversion_cast`s even though the IR had no standard
operations in it. The pass must have been also run the last among all to-LLVM
passes, in contradiction with the partial conversion logic. Additionally, the
way it was set up could produce invalid operations by removing casts between
LLVM and built-in types even when the consumer did not accept the uncasted
type, or could lead to cryptic conversion errors (recursive application of the
rewrite pattern on `unrealized_conversion_cast` as a means to indicate failure
to eliminate casts).
In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is not
specific to to-LLVM conversions and can be factored out into a separate type
reconciliation pass, which is achieved in this commit. While the cast operation
itself has a folder pattern, it is insufficient in most conversion passes as
the folder only applies to the second cast. Without complex legality setup in
the conversion target, the conversion infra will either consider the cast
operations valid and not fold them (a separate canonicalization would be
necessary to trigger the folding), or consider the first cast invalid upon
generation and stop with error. The pattern provided by the reconciliation pass
applies to the first cast operation instead. Furthermore, having a separate
pass makes it clear when `unrealized_conversion_cast`s could not have been
eliminated since it is the only reason why this pass can fail.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D109507
2021-09-09 16:06:10 +02:00
|
|
|
hdrs = glob(["include/mlir/Conversion/ReconcileUnrealizedCasts/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":TransformUtils",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
2022-03-08 08:55:55 +01:00
|
|
|
name = "FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = [
|
2022-03-08 08:55:55 +01:00
|
|
|
"lib/Conversion/FuncToLLVM/FuncToLLVM.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
hdrs = [
|
2022-03-08 08:55:55 +01:00
|
|
|
"include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h",
|
|
|
|
"include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DataLayoutInterfaces",
|
2021-06-27 08:30:54 -07:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Parser",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-06 17:21:48 -08:00
|
|
|
cc_library(
|
|
|
|
name = "ControlFlowToLLVM",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DataLayoutInterfaces",
|
|
|
|
":DialectUtils",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Parser",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ControlFlowToSPIRV",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/ControlFlowToSPIRV/*.cpp"]),
|
2022-02-06 17:21:48 -08:00
|
|
|
hdrs = glob(["include/mlir/Conversion/ControlFlowToSPIRV/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVCommonConversion",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVUtils",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-12 11:24:13 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MemRefToLLVM",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/MemRefToLLVM/*.cpp"]),
|
2021-07-12 11:24:13 -07:00
|
|
|
hdrs = glob(["include/mlir/Conversion/MemRefToLLVM/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DataLayoutInterfaces",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
2023-07-11 14:13:07 -07:00
|
|
|
":MemRefUtils",
|
2021-07-12 11:24:13 -07:00
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
2022-02-06 17:21:48 -08:00
|
|
|
"//llvm:Support",
|
2021-07-12 11:24:13 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-29 16:22:46 -04:00
|
|
|
cc_library(
|
|
|
|
name = "MemRefToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/MemRefToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/MemRefToSPIRV/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-07-29 16:22:46 -04:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/MemRefToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/MemRefToSPIRV",
|
|
|
|
],
|
|
|
|
deps = [
|
2023-02-15 10:33:10 -08:00
|
|
|
":ArithDialect",
|
2021-07-29 16:22:46 -04:00
|
|
|
":ConversionPassIncGen",
|
2022-08-06 11:34:24 +02:00
|
|
|
":FuncDialect",
|
2021-07-29 16:22:46 -04:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-11-04 19:06:44 +01:00
|
|
|
cc_library(
|
|
|
|
name = "ArithAttrToLLVMConversion",
|
|
|
|
srcs = glob(["lib/Conversion/ArithCommon/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Conversion/ArithCommon/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArithDialect",
|
|
|
|
":LLVMDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-10-12 23:14:57 +00:00
|
|
|
cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithToLLVM",
|
|
|
|
srcs = glob(["lib/Conversion/ArithToLLVM/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Conversion/ArithToLLVM/*.h"]),
|
2021-10-12 23:14:57 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-11-04 19:06:44 +01:00
|
|
|
":ArithAttrToLLVMConversion",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-10-12 23:14:57 +00:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithToSPIRV",
|
|
|
|
srcs = glob(["lib/Conversion/ArithToSPIRV/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Conversion/ArithToSPIRV/*.h"]),
|
2021-10-12 23:14:57 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-10-12 23:14:57 +00:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 21:45:25 +00:00
|
|
|
":FuncToSPIRV",
|
2021-10-12 23:14:57 +00:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVCommonConversion",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-07-12 11:24:13 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MathToLLVM",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/MathToLLVM/*.cpp"]),
|
2021-07-12 11:24:13 -07:00
|
|
|
hdrs = glob(["include/mlir/Conversion/MathToLLVM/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
2022-11-04 19:06:44 +01:00
|
|
|
":ArithAttrToLLVMConversion",
|
2021-07-12 11:24:13 -07:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DataLayoutInterfaces",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-08-26 09:04:50 +02:00
|
|
|
cc_library(
|
|
|
|
name = "MathToFuncs",
|
2022-08-31 13:31:11 +02:00
|
|
|
srcs = glob(["lib/Conversion/MathToFuncs/*.cpp"]),
|
2022-08-26 09:04:50 +02:00
|
|
|
hdrs = glob(["include/mlir/Conversion/MathToFuncs/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-08-26 09:04:50 +02:00
|
|
|
":ControlFlowDialect",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DialectUtils",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
2023-04-13 14:58:11 +02:00
|
|
|
":SCFDialect",
|
2022-08-26 09:04:50 +02:00
|
|
|
":Transforms",
|
|
|
|
":VectorDialect",
|
|
|
|
":VectorUtils",
|
2022-08-26 09:06:40 +02:00
|
|
|
"//llvm:Support",
|
2022-08-26 09:04:50 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-27 08:37:45 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BytecodeOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Bytecode/BytecodeOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Bytecode/BytecodeOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Bytecode/BytecodeOpInterface.td",
|
|
|
|
deps = [":BytecodeOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "CallOpInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/CallInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/CallInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/CallInterfaces.td",
|
|
|
|
deps = [":CallInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "CallOpInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/CallInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/CallInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CallOpInterfacesIncGen",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
2023-06-02 08:32:01 +02:00
|
|
|
name = "CastInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/CastInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/CastInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/CastInterfaces.td",
|
|
|
|
deps = [":CastInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2023-06-02 08:32:01 +02:00
|
|
|
name = "CastInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/Interfaces/CastInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/CastInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ControlFlowInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/ControlFlowInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td",
|
|
|
|
deps = [":ControlFlowInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ControlFlowInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/ControlFlowInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/ControlFlowInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfacesIncGen",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "InferTypeOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/InferTypeOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/InferTypeOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/InferTypeOpInterface.td",
|
|
|
|
deps = [":InferTypeOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "InferTypeOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/InferTypeOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/InferTypeOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterfaceIncGen",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "SideEffectInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/SideEffectInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/SideEffectInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/SideEffectInterfaces.td",
|
|
|
|
deps = [":SideEffectInterfacesTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "SideEffectInterfaces",
|
|
|
|
srcs = ["lib/Interfaces/SideEffectInterfaces.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/SideEffectInterfaces.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":SideEffectInterfacesIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-08-30 15:55:30 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TilingInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/TilingInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/TilingInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/TilingInterface.td",
|
|
|
|
deps = [":TilingInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "Analysis",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Analysis/*.cpp",
|
|
|
|
"lib/Analysis/*.h",
|
|
|
|
"lib/Analysis/*/*.cpp",
|
|
|
|
"lib/Analysis/*/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"include/mlir/Analysis/*.h",
|
|
|
|
"include/mlir/Analysis/*/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CallOpInterfaces",
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":DataLayoutInterfaces",
|
|
|
|
":IR",
|
2022-06-03 20:43:02 +02:00
|
|
|
":InferIntRangeInterface",
|
|
|
|
":LoopLikeInterface",
|
2023-01-09 10:27:15 +01:00
|
|
|
":Pass",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-09 23:34:57 +00:00
|
|
|
name = "TranslateLib",
|
2022-10-21 19:50:22 -07:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Tools/mlir-translate/*.cpp",
|
|
|
|
]) + [
|
2022-10-27 16:45:14 -04:00
|
|
|
"include/mlir/Tools/ParseUtilities.h",
|
2022-10-21 19:50:22 -07:00
|
|
|
],
|
2022-03-07 13:04:05 +01:00
|
|
|
hdrs = glob(["include/mlir/Tools/mlir-translate/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Parser",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ToLLVMIRTranslation",
|
|
|
|
srcs = [
|
|
|
|
"lib/Target/LLVMIR/DebugTranslation.cpp",
|
|
|
|
"lib/Target/LLVMIR/DebugTranslation.h",
|
2023-02-03 09:42:34 +01:00
|
|
|
"lib/Target/LLVMIR/LoopAnnotationTranslation.cpp",
|
2023-02-08 13:05:19 +01:00
|
|
|
"lib/Target/LLVMIR/LoopAnnotationTranslation.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"lib/Target/LLVMIR/ModuleTranslation.cpp",
|
2021-06-24 09:42:14 -07:00
|
|
|
"lib/Target/LLVMIR/TypeToLLVM.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Target/LLVMIR/Export.h",
|
|
|
|
"include/mlir/Target/LLVMIR/LLVMTranslationInterface.h",
|
|
|
|
"include/mlir/Target/LLVMIR/ModuleTranslation.h",
|
2021-06-24 09:42:14 -07:00
|
|
|
"include/mlir/Target/LLVMIR/TypeToLLVM.h",
|
2023-01-31 11:41:35 +01:00
|
|
|
"lib/Target/LLVMIR/AttrKindDetail.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-01 18:21:38 +01:00
|
|
|
":DLTIDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMConversionIncGen",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMIRTransforms",
|
2022-04-13 18:29:47 +02:00
|
|
|
":LLVMIntrinsicConversionIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenMPDialect",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:FrontendOpenMP",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TransformUtils",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AMXToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/AMX/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/AMX/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMXConversionIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMXDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "X86VectorToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/X86Vector/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/X86Vector/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
":X86VectorConversionIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ArmNeonToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/ArmNeon/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmNeon/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmNeonConversionIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmNeonDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ArmNeonIncGen",
|
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-06-14 23:11:53 +00:00
|
|
|
cc_library(
|
|
|
|
name = "ArmSMEToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSME/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSME/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSMEConversionIncGen",
|
|
|
|
":ArmSMEDialect",
|
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "ArmSVEToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSVE/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSVE/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSVEConversionIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmSVEDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "NVVMToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/NVVM/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/NVVM/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-10-28 15:08:41 +02:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":NVVMConversionIncGen",
|
|
|
|
":NVVMDialect",
|
2022-10-28 15:08:41 +02:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ROCDLToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/ROCDL/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ROCDL/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":ROCDLConversionIncGen",
|
|
|
|
":ROCDLDialect",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-03-21 15:00:10 +01:00
|
|
|
cc_library(
|
|
|
|
name = "GPUToLLVMIRTranslation",
|
2023-03-28 13:11:47 -07:00
|
|
|
srcs = ["lib/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.h"],
|
2023-03-21 15:00:10 +01:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "BuiltinToLLVMIRTranslation",
|
2023-03-28 13:11:47 -07:00
|
|
|
srcs = ["lib/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h"],
|
2023-03-21 15:00:10 +01:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "LLVMToLLVMIRTranslation",
|
2023-01-02 13:05:26 +01:00
|
|
|
srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":LLVMConversionIncGen",
|
|
|
|
":LLVMDialect",
|
2022-04-13 18:29:47 +02:00
|
|
|
":LLVMIntrinsicConversionIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-03-20 13:58:45 -07:00
|
|
|
cc_library(
|
|
|
|
name = "OpenMPCommon",
|
|
|
|
srcs = ["lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/OpenMPCommon.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Support",
|
2023-03-20 23:33:54 +01:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:FrontendOpenMP",
|
2023-03-20 13:58:45 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-01-02 13:05:26 +01:00
|
|
|
cc_library(
|
|
|
|
name = "LLVMIRToLLVMTranslation",
|
|
|
|
srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp"],
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":FromLLVMIRTranslation",
|
|
|
|
":LLVMConversionIncGen",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMIntrinsicConversionIncGen",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "OpenACCToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/OpenACC/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenACC/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":OpenACCDialect",
|
|
|
|
":OpenACCToLLVM",
|
2023-03-20 13:58:45 -07:00
|
|
|
":OpenMPCommon",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:FrontendOpenMP",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "OpenMPToLLVMIRTranslation",
|
|
|
|
srcs = glob(["lib/Target/LLVMIR/Dialect/OpenMP/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenMP/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
2023-07-17 10:47:51 +02:00
|
|
|
":LLVMDialect",
|
2023-03-20 13:58:45 -07:00
|
|
|
":OpenMPCommon",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenMPDialect",
|
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
2023-04-26 13:47:00 -04:00
|
|
|
":Transforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:FrontendOpenMP",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AllToLLVMIRTranslations",
|
|
|
|
hdrs = ["include/mlir/Target/LLVMIR/Dialect/All.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AMXToLLVMIRTranslation",
|
|
|
|
":ArmNeonToLLVMIRTranslation",
|
2023-06-14 23:11:53 +00:00
|
|
|
":ArmSMEToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ArmSVEToLLVMIRTranslation",
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
|
|
|
":GPUToLLVMIRTranslation",
|
2023-01-02 13:05:26 +01:00
|
|
|
":LLVMIRToLLVMTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":NVVMToLLVMIRTranslation",
|
|
|
|
":OpenACCToLLVMIRTranslation",
|
|
|
|
":OpenMPToLLVMIRTranslation",
|
|
|
|
":ROCDLToLLVMIRTranslation",
|
|
|
|
":X86VectorToLLVMIRTranslation",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ToLLVMIRTranslationRegistration",
|
|
|
|
srcs = ["lib/Target/LLVMIR/ConvertToLLVMIR.cpp"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllToLLVMIRTranslations",
|
2022-03-01 18:21:38 +01:00
|
|
|
":DLTIDialect",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":ToLLVMIRTranslation",
|
2022-06-09 23:34:57 +00:00
|
|
|
":TranslateLib",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "FromLLVMIRTranslation",
|
|
|
|
srcs = [
|
2023-03-31 14:20:01 +02:00
|
|
|
"lib/Target/LLVMIR/DataLayoutImporter.cpp",
|
|
|
|
"lib/Target/LLVMIR/DataLayoutImporter.h",
|
2022-11-18 10:18:37 +01:00
|
|
|
"lib/Target/LLVMIR/DebugImporter.cpp",
|
2023-02-08 13:08:26 +01:00
|
|
|
"lib/Target/LLVMIR/LoopAnnotationImporter.cpp",
|
|
|
|
"lib/Target/LLVMIR/LoopAnnotationImporter.h",
|
2022-12-19 12:04:47 +01:00
|
|
|
"lib/Target/LLVMIR/ModuleImport.cpp",
|
2021-06-24 09:42:14 -07:00
|
|
|
"lib/Target/LLVMIR/TypeFromLLVM.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Target/LLVMIR/Import.h",
|
2023-01-02 13:05:26 +01:00
|
|
|
"include/mlir/Target/LLVMIR/LLVMImportInterface.h",
|
2022-12-19 12:04:47 +01:00
|
|
|
"include/mlir/Target/LLVMIR/ModuleImport.h",
|
2021-06-24 09:42:14 -07:00
|
|
|
"include/mlir/Target/LLVMIR/TypeFromLLVM.h",
|
2023-01-31 11:41:35 +01:00
|
|
|
"lib/Target/LLVMIR/AttrKindDetail.h",
|
2022-11-18 10:18:37 +01:00
|
|
|
"lib/Target/LLVMIR/DebugImporter.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-03-01 18:21:38 +01:00
|
|
|
":DLTIDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMConversionIncGen",
|
|
|
|
":LLVMDialect",
|
2022-05-31 13:35:49 +02:00
|
|
|
":LLVMIntrinsicConversionIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
2022-06-09 23:34:57 +00:00
|
|
|
":TranslateLib",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
2022-11-18 01:47:56 +00:00
|
|
|
"//llvm:IRPrinter",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:IRReader",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-01-02 13:05:26 +01:00
|
|
|
cc_library(
|
|
|
|
name = "FromLLVMIRTranslationRegistration",
|
|
|
|
srcs = [
|
|
|
|
"lib/Target/LLVMIR/ConvertFromLLVMIR.cpp",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":AllToLLVMIRTranslations",
|
|
|
|
":DLTIDialect",
|
|
|
|
":FromLLVMIRTranslation",
|
|
|
|
":IR",
|
|
|
|
":TranslateLib",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:IRReader",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "ExecutionEngine",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/ExecutionEngine/CRunnerUtils.h",
|
|
|
|
"lib/ExecutionEngine/ExecutionEngine.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/ExecutionEngine/ExecutionEngine.h",
|
|
|
|
"include/mlir/ExecutionEngine/MemRefUtils.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllToLLVMIRTranslations",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
2021-11-23 13:25:26 -08:00
|
|
|
"//llvm:AllTargetsAsmParsers",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:BitWriter",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:ExecutionEngine",
|
|
|
|
"//llvm:MC",
|
|
|
|
"//llvm:OrcJIT",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:Target", # fixdeps: keep
|
2023-02-10 11:40:14 +00:00
|
|
|
"//llvm:TargetParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:TransformUtils",
|
|
|
|
"//llvm:X86CodeGen", # fixdeps: keep
|
|
|
|
"//llvm:X86Disassembler", # fixdeps: keep
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ExecutionEngineUtils",
|
|
|
|
srcs = ["lib/ExecutionEngine/OptUtils.cpp"],
|
|
|
|
hdrs = ["include/mlir/ExecutionEngine/OptUtils.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
"//llvm:Analysis",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Coroutines",
|
|
|
|
"//llvm:IPO",
|
2022-04-12 04:47:42 +00:00
|
|
|
"//llvm:Passes",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:Target",
|
|
|
|
"//llvm:common_transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-04-13 14:58:11 +02:00
|
|
|
cc_library(
|
|
|
|
name = "PluginsLib",
|
|
|
|
srcs = [
|
|
|
|
"lib/Tools/Plugins/DialectPlugin.cpp",
|
|
|
|
"lib/Tools/Plugins/PassPlugin.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Tools/Plugins/DialectPlugin.h",
|
|
|
|
"include/mlir/Tools/Plugins/PassPlugin.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MlirOptLib",
|
2022-09-28 08:29:00 +02:00
|
|
|
srcs = [
|
2022-10-27 16:45:14 -04:00
|
|
|
"include/mlir/Tools/ParseUtilities.h",
|
2022-09-28 08:29:00 +02:00
|
|
|
"lib/Tools/mlir-opt/MlirOptMain.cpp",
|
2022-09-28 08:17:04 +02:00
|
|
|
],
|
2022-09-28 08:29:00 +02:00
|
|
|
hdrs = ["include/mlir/Tools/mlir-opt/MlirOptMain.h"],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-22 17:59:51 +02:00
|
|
|
":BytecodeReader",
|
2022-08-22 12:06:47 +02:00
|
|
|
":BytecodeWriter",
|
2023-03-06 17:24:26 +01:00
|
|
|
":Debug",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2023-04-23 23:54:29 +02:00
|
|
|
":IRDLDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Parser",
|
|
|
|
":Pass",
|
2023-04-13 14:58:11 +02:00
|
|
|
":PluginsLib",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AllTranslations",
|
|
|
|
hdrs = ["include/mlir/InitAllTranslations.h"],
|
|
|
|
deps = [
|
2023-01-02 13:05:26 +01:00
|
|
|
":FromLLVMIRTranslationRegistration",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SPIRVTranslateRegistration",
|
2021-09-02 10:04:48 -07:00
|
|
|
":TargetCpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ToLLVMIRTranslationRegistration",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MlirTranslateMain",
|
|
|
|
srcs = ["tools/mlir-translate/mlir-translate.cpp"],
|
|
|
|
deps = [
|
|
|
|
":AllPassesAndDialects",
|
|
|
|
":AllTranslations",
|
|
|
|
":Support",
|
2022-06-09 23:34:57 +00:00
|
|
|
":TranslateLib",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-translate",
|
|
|
|
deps = [":MlirTranslateMain"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AllPassesAndDialects",
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/InitAllDialects.h",
|
|
|
|
"include/mlir/InitAllPasses.h",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMDGPUDialect",
|
2022-05-12 13:35:27 +02:00
|
|
|
":AMDGPUToROCDL",
|
2023-05-04 10:09:53 +02:00
|
|
|
":AMDGPUTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMXDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AMXTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffinePassIncGen",
|
|
|
|
":AffineToStandard",
|
2022-11-21 10:20:19 +01:00
|
|
|
":AffineTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffineTransforms",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithToLLVM",
|
|
|
|
":ArithToSPIRV",
|
|
|
|
":ArithTransforms",
|
2023-04-06 10:46:48 +09:00
|
|
|
":ArithValueBoundsOpInterfaceImpl",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmNeonDialect",
|
2023-06-14 23:28:50 +00:00
|
|
|
":ArmSMEDialect",
|
2023-06-16 13:20:32 +02:00
|
|
|
":ArmSMETransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmSVEDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ArmSVETransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AsyncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AsyncPassIncGen",
|
|
|
|
":AsyncToLLVM",
|
|
|
|
":AsyncTransforms",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2022-06-09 13:00:08 +02:00
|
|
|
":BufferizationTransformOps",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexDialect",
|
|
|
|
":ComplexToLLVM",
|
2022-05-13 17:12:11 +02:00
|
|
|
":ComplexToLibm",
|
2023-03-30 08:49:57 -07:00
|
|
|
":ComplexToSPIRV",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPasses",
|
|
|
|
":DLTIDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":EmitCDialect",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
|
|
|
":FuncToSPIRV",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
|
|
|
":FuncTransformsPassIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUPassIncGen",
|
|
|
|
":GPUToGPURuntimeTransforms",
|
|
|
|
":GPUToNVVMTransforms",
|
|
|
|
":GPUToROCDLTransforms",
|
|
|
|
":GPUToSPIRV",
|
|
|
|
":GPUToVulkanTransforms",
|
2022-10-03 09:56:42 +02:00
|
|
|
":GPUTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUTransforms",
|
|
|
|
":IR",
|
2023-04-05 01:07:25 +00:00
|
|
|
":IRDLDialect",
|
2022-10-21 12:23:46 -07:00
|
|
|
":IndexDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMIRTransforms",
|
|
|
|
":LLVMPassIncGen",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgPassIncGen",
|
|
|
|
":LinalgToStandard",
|
2022-04-29 21:34:41 +09:00
|
|
|
":LinalgTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgTransforms",
|
2022-04-13 20:16:04 -07:00
|
|
|
":MLProgramDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathDialect",
|
2022-08-26 09:04:50 +02:00
|
|
|
":MathToFuncs",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MathToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathToLibm",
|
2021-07-29 16:21:43 -04:00
|
|
|
":MathToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathTransforms",
|
|
|
|
":MemRefDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-07-29 16:22:46 -04:00
|
|
|
":MemRefToSPIRV",
|
2022-09-29 00:12:46 +02:00
|
|
|
":MemRefTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":NVGPUDialect",
|
2022-06-07 10:51:27 -06:00
|
|
|
":NVGPUPassIncGen",
|
2022-04-15 04:07:46 +00:00
|
|
|
":NVGPUToNVVM",
|
2023-06-27 09:02:31 +00:00
|
|
|
":NVGPUTransformOps",
|
2023-07-03 13:16:28 +02:00
|
|
|
":NVGPUTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":NVVMDialect",
|
|
|
|
":OpenACCDialect",
|
|
|
|
":OpenMPDialect",
|
|
|
|
":OpenMPToLLVM",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLInterpDialect",
|
|
|
|
":PDLToPDLInterp",
|
|
|
|
":QuantOps",
|
|
|
|
":ROCDLDialect",
|
[mlir] Factor type reconciliation out of Standard-to-LLVM conversion
Conversion to the LLVM dialect is being refactored to be more progressive and
is now performed as a series of independent passes converting different
dialects. These passes may produce `unrealized_conversion_cast` operations that
represent pending conversions between built-in and LLVM dialect types.
Historically, a more monolithic Standard-to-LLVM conversion pass did not need
these casts as all operations were converted in one shot. Previous refactorings
have led to the requirement of running the Standard-to-LLVM conversion pass to
clean up `unrealized_conversion_cast`s even though the IR had no standard
operations in it. The pass must have been also run the last among all to-LLVM
passes, in contradiction with the partial conversion logic. Additionally, the
way it was set up could produce invalid operations by removing casts between
LLVM and built-in types even when the consumer did not accept the uncasted
type, or could lead to cryptic conversion errors (recursive application of the
rewrite pattern on `unrealized_conversion_cast` as a means to indicate failure
to eliminate casts).
In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is not
specific to to-LLVM conversions and can be factored out into a separate type
reconciliation pass, which is achieved in this commit. While the cast operation
itself has a folder pattern, it is insufficient in most conversion passes as
the folder only applies to the second cast. Without complex legality setup in
the conversion target, the conversion infra will either consider the cast
operations valid and not fold them (a separate canonicalization would be
necessary to trigger the folding), or consider the first cast invalid upon
generation and stop with error. The pattern provided by the reconciliation pass
applies to the first cast operation instead. Furthermore, having a separate
pass makes it clear when `unrealized_conversion_cast`s could not have been
eliminated since it is the only reason why this pass can fail.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D109507
2021-09-09 16:06:10 +02:00
|
|
|
":ReconcileUnrealizedCasts",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SCFDialect",
|
|
|
|
":SCFPassIncGen",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SCFToControlFlow",
|
|
|
|
":SCFToGPU",
|
2022-06-09 11:10:32 +02:00
|
|
|
":SCFTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SCFTransforms",
|
|
|
|
":SDBM",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVPassIncGen",
|
|
|
|
":SPIRVToLLVM",
|
|
|
|
":SPIRVTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ShapeDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ShapeToStandard",
|
|
|
|
":ShapeTransforms",
|
|
|
|
":ShapeTransformsPassIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2022-01-26 16:44:32 -08:00
|
|
|
":SparseTensorPipelines",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SparseTensorTransforms",
|
|
|
|
":TensorDialect",
|
2021-12-10 12:03:47 +01:00
|
|
|
":TensorInferTypeOpInterfaceImpl",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TensorTilingInterfaceImpl",
|
2023-03-29 11:02:26 +02:00
|
|
|
":TensorTransformOps",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TensorTransforms",
|
|
|
|
":TosaDialect",
|
|
|
|
":TosaToLinalg",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
":TransformDialect",
|
2022-05-25 15:57:22 +02:00
|
|
|
":TransformDialectTransforms",
|
2023-05-22 14:36:58 +00:00
|
|
|
":TransformPDLExtension",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
|
|
|
":TransformsPassIncGen",
|
2023-07-20 17:05:28 +02:00
|
|
|
":UBDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":VectorToLLVM",
|
|
|
|
":VectorToSCF",
|
|
|
|
":VectorToSPIRV",
|
2022-06-21 06:52:01 -07:00
|
|
|
":VectorTransformOps",
|
2022-02-15 21:16:50 +09:00
|
|
|
":VectorTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":X86VectorTransforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-lsp-server",
|
|
|
|
srcs = ["tools/mlir-lsp-server/mlir-lsp-server.cpp"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllPassesAndDialects",
|
2022-09-04 11:37:06 +02:00
|
|
|
":BytecodeWriter",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MlirLspServerLib",
|
2022-09-04 11:37:06 +02:00
|
|
|
":Parser",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-opt",
|
|
|
|
srcs = ["tools/mlir-opt/mlir-opt.cpp"],
|
|
|
|
local_defines = ["MLIR_INCLUDE_TESTS"],
|
|
|
|
deps = [
|
2023-06-09 17:04:41 -07:00
|
|
|
":AllExtensions",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AllPassesAndDialects",
|
|
|
|
":Analysis",
|
|
|
|
":IR",
|
|
|
|
":MlirOptLib",
|
|
|
|
":OpenMPDialect",
|
|
|
|
":Pass",
|
|
|
|
":QuantOps",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SCFToGPU",
|
2023-03-20 09:28:25 +01:00
|
|
|
":SerializeToCubin",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:AllTargetsCodeGens",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//mlir/test:TestAffine",
|
|
|
|
"//mlir/test:TestAnalysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
"//mlir/test:TestArith",
|
2022-12-02 11:46:14 +01:00
|
|
|
"//mlir/test:TestBufferization",
|
2022-12-15 17:37:49 +01:00
|
|
|
"//mlir/test:TestControlFlow",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestDLTI",
|
|
|
|
"//mlir/test:TestDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
"//mlir/test:TestFunc",
|
2022-03-08 08:55:55 +01:00
|
|
|
"//mlir/test:TestFuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestGPU",
|
|
|
|
"//mlir/test:TestIR",
|
2022-11-25 10:22:32 -08:00
|
|
|
"//mlir/test:TestLLVM",
|
2022-12-02 16:56:05 +01:00
|
|
|
"//mlir/test:TestLinalg",
|
2023-02-10 19:02:01 +01:00
|
|
|
"//mlir/test:TestLoopLikeInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestMath",
|
2022-01-27 09:44:06 +01:00
|
|
|
"//mlir/test:TestMemRef",
|
2022-08-02 08:53:31 +02:00
|
|
|
"//mlir/test:TestNVGPU",
|
2023-03-27 11:44:15 -07:00
|
|
|
"//mlir/test:TestOneToNTypeConversion",
|
2022-04-27 12:11:03 +02:00
|
|
|
"//mlir/test:TestPDLL",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestPass",
|
|
|
|
"//mlir/test:TestReducer",
|
|
|
|
"//mlir/test:TestRewrite",
|
|
|
|
"//mlir/test:TestSCF",
|
|
|
|
"//mlir/test:TestSPIRV",
|
|
|
|
"//mlir/test:TestShapeDialect",
|
2022-02-16 11:26:47 -05:00
|
|
|
"//mlir/test:TestTensor",
|
2022-09-19 21:20:12 +02:00
|
|
|
"//mlir/test:TestTestDynDialect",
|
2022-06-13 19:56:32 +00:00
|
|
|
"//mlir/test:TestTilingInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestTosaDialect",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
"//mlir/test:TestTransformDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//mlir/test:TestTransforms",
|
|
|
|
"//mlir/test:TestTypeDialect",
|
|
|
|
"//mlir/test:TestVector",
|
2023-03-10 13:54:16 -05:00
|
|
|
"//mlir/test:TestVectorToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MlirJitRunner",
|
|
|
|
srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
|
2022-10-03 13:54:58 -07:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/ExecutionEngine/JitRunner.h",
|
2022-10-27 16:45:14 -04:00
|
|
|
"include/mlir/Tools/ParseUtilities.h",
|
2022-10-03 13:54:58 -07:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllPassesAndDialects",
|
|
|
|
":ExecutionEngine",
|
|
|
|
":ExecutionEngineUtils",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":OpenACCToLLVMIRTranslation",
|
|
|
|
":OpenMPToLLVMIRTranslation",
|
|
|
|
":Parser",
|
2022-06-09 23:34:57 +00:00
|
|
|
":SCFToControlFlow",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:OrcJIT",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-04 10:18:31 +02:00
|
|
|
name = "mlir_async_runtime_api",
|
|
|
|
hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "_mlir_async_runtime",
|
|
|
|
srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"],
|
|
|
|
copts = ["-Dmlir_async_runtime_EXPORTS"],
|
|
|
|
deps = [
|
|
|
|
":mlir_async_runtime_api",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-09-07 21:57:02 +02:00
|
|
|
# Indirection to avoid 'libmlir_async_runtime.so' filename clash.
|
2022-09-04 10:18:31 +02:00
|
|
|
alias(
|
|
|
|
name = "mlir_async_runtime",
|
|
|
|
actual = "_mlir_async_runtime",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "libmlir_async_runtime.so",
|
|
|
|
linkshared = True,
|
|
|
|
linkstatic = False,
|
|
|
|
deps = [":mlir_async_runtime"],
|
|
|
|
)
|
|
|
|
|
2022-09-29 11:40:40 -07:00
|
|
|
cc_library(
|
|
|
|
name = "_mlir_float16_utils",
|
|
|
|
srcs = ["lib/ExecutionEngine/Float16bits.cpp"],
|
|
|
|
hdrs = ["include/mlir/ExecutionEngine/Float16bits.h"],
|
|
|
|
copts = ["-Dmlir_float16_utils_EXPORTS"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Indirection to avoid 'libmlir_float16_utils.so' filename clash.
|
|
|
|
alias(
|
|
|
|
name = "mlir_float16_utils",
|
|
|
|
actual = "_mlir_float16_utils",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "libmlir_float16_utils.so",
|
|
|
|
linkshared = True,
|
|
|
|
linkstatic = False,
|
|
|
|
deps = [":mlir_float16_utils"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make
|
2022-10-10 13:41:58 -07:00
|
|
|
# this a shared library: because on the CMake side, doing so causes issues
|
|
|
|
# when building on Windows. In particular, various functions take/return
|
|
|
|
# `std::vector` but that class is not designed with dllimport/dllexport
|
|
|
|
# pragma, therefore it cannot be safely/correctly used across DLL boundaries.
|
|
|
|
# Consequently, we avoid using the "mlir_xxx_utils" naming scheme,
|
|
|
|
# since that is reserved/intended for shared libraries only.
|
2022-09-29 11:40:40 -07:00
|
|
|
cc_library(
|
2022-10-10 13:41:58 -07:00
|
|
|
name = "SparseTensorRuntime",
|
2022-09-29 11:40:40 -07:00
|
|
|
srcs = [
|
|
|
|
"lib/ExecutionEngine/SparseTensor/File.cpp",
|
|
|
|
"lib/ExecutionEngine/SparseTensor/NNZ.cpp",
|
2022-11-09 13:33:01 -08:00
|
|
|
"lib/ExecutionEngine/SparseTensor/PermutationRef.cpp",
|
2022-09-29 11:40:40 -07:00
|
|
|
"lib/ExecutionEngine/SparseTensor/Storage.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
2022-11-16 12:59:54 -08:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/ArithmeticUtils.h",
|
2022-11-09 13:33:01 -08:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/Attributes.h",
|
2022-09-29 11:40:40 -07:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/COO.h",
|
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/ErrorHandling.h",
|
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/File.h",
|
2022-11-09 13:33:01 -08:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/PermutationRef.h",
|
2022-09-29 11:40:40 -07:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensor/Storage.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
2022-10-17 18:13:05 -07:00
|
|
|
deps = [
|
|
|
|
":SparseTensorEnums",
|
|
|
|
":mlir_float16_utils",
|
|
|
|
],
|
2022-09-29 11:40:40 -07:00
|
|
|
)
|
|
|
|
|
2022-09-04 10:18:31 +02:00
|
|
|
cc_library(
|
|
|
|
name = "_mlir_c_runner_utils",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = [
|
|
|
|
"lib/ExecutionEngine/CRunnerUtils.cpp",
|
2022-10-10 13:41:58 -07:00
|
|
|
"lib/ExecutionEngine/SparseTensorRuntime.cpp",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
2021-11-05 15:15:39 -07:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/ExecutionEngine/CRunnerUtils.h",
|
2022-04-11 17:28:51 -07:00
|
|
|
"include/mlir/ExecutionEngine/Msan.h",
|
2022-10-10 13:41:58 -07:00
|
|
|
"include/mlir/ExecutionEngine/SparseTensorRuntime.h",
|
2021-11-05 15:15:39 -07:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
2022-10-17 18:13:05 -07:00
|
|
|
deps = [
|
|
|
|
":SparseTensorEnums",
|
|
|
|
":SparseTensorRuntime",
|
|
|
|
":mlir_float16_utils",
|
2023-06-22 07:50:38 +02:00
|
|
|
"//llvm:Support",
|
2022-10-17 18:13:05 -07:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2022-09-07 21:57:02 +02:00
|
|
|
# Indirection to avoid 'libmlir_c_runner_utils.so' filename clash.
|
2022-09-04 10:18:31 +02:00
|
|
|
alias(
|
|
|
|
name = "mlir_c_runner_utils",
|
|
|
|
actual = "_mlir_c_runner_utils",
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2023-06-22 07:50:38 +02:00
|
|
|
cc_headers_only(
|
|
|
|
name = "mlir_c_runner_utils_hdrs",
|
|
|
|
src = ":mlir_c_runner_utils",
|
|
|
|
)
|
|
|
|
|
2022-09-04 10:18:31 +02:00
|
|
|
cc_binary(
|
|
|
|
name = "libmlir_c_runner_utils.so",
|
|
|
|
linkshared = True,
|
|
|
|
linkstatic = False,
|
|
|
|
deps = [":mlir_c_runner_utils"],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-04 10:18:31 +02:00
|
|
|
name = "_mlir_runner_utils",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/ExecutionEngine/RunnerUtils.cpp"],
|
|
|
|
hdrs = ["include/mlir/ExecutionEngine/RunnerUtils.h"],
|
|
|
|
includes = ["include"],
|
2023-06-20 23:00:38 +02:00
|
|
|
deps = [
|
|
|
|
":mlir_c_runner_utils",
|
2023-06-21 14:29:44 +02:00
|
|
|
"//llvm:Support",
|
2023-06-20 23:00:38 +02:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
2022-09-07 21:57:02 +02:00
|
|
|
# Indirection to avoid 'libmlir_runner_utils.so' filename clash.
|
2022-09-04 10:18:31 +02:00
|
|
|
alias(
|
|
|
|
name = "mlir_runner_utils",
|
|
|
|
actual = "_mlir_runner_utils",
|
|
|
|
)
|
|
|
|
|
2023-06-22 07:50:38 +02:00
|
|
|
cc_headers_only(
|
|
|
|
name = "mlir_runner_utils_hdrs",
|
|
|
|
src = ":mlir_runner_utils",
|
|
|
|
)
|
|
|
|
|
2022-09-04 10:18:31 +02:00
|
|
|
cc_binary(
|
|
|
|
name = "libmlir_runner_utils.so",
|
|
|
|
linkshared = True,
|
|
|
|
linkstatic = False,
|
|
|
|
deps = [":mlir_runner_utils"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_binary(
|
|
|
|
name = "mlir-cpu-runner",
|
|
|
|
srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"],
|
|
|
|
deps = [
|
|
|
|
":AllToLLVMIRTranslations",
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ExecutionEngineUtils",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":MlirJitRunner",
|
|
|
|
":OpenACCToLLVMIRTranslation",
|
|
|
|
":OpenMPToLLVMIRTranslation",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:AsmParser",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:X86AsmParser",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# This target provides the headers from LLVM's Support target without any of
|
|
|
|
# the symbols. In particular, it does not contain the static registration code
|
|
|
|
# which may be executed by at most one shared library loaded by ORCJit. Direct
|
|
|
|
# dependencies need to avoid requiring symbols from LLVMSupport by adding
|
|
|
|
# copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"].
|
|
|
|
#
|
|
|
|
# Bazel links the dependencies' object files instead of the archives, which
|
|
|
|
# means that symbols are linked in even if none are used. The LLVM cmake build
|
|
|
|
# on the other hand links archives (or shared libraries, depending on
|
|
|
|
# BUILD_SHARED_LIBS), skipping them if none of the symbols are used.
|
|
|
|
# See also https://reviews.llvm.org/D95613.
|
|
|
|
cc_headers_only(
|
|
|
|
name = "LLVMSupportHeaders",
|
|
|
|
src = "//llvm:Support",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-04 10:18:31 +02:00
|
|
|
name = "_mlir_cuda_runtime",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["lib/ExecutionEngine/CudaRuntimeWrappers.cpp"],
|
|
|
|
# Prevent needing EnableABIBreakingChecks symbol from LLVMSupport.
|
|
|
|
copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"],
|
2023-06-06 23:12:45 +00:00
|
|
|
# Here:
|
|
|
|
# MLIR_ENABLE_CUDA_CUSPARSE : enables cuSPARSE
|
|
|
|
# MLIR_ENABLE_CUDA_CUSPARSELT : enables cuSPARSElt
|
|
|
|
local_defines = ["MLIR_ENABLE_CUDA_CUSPARSE"],
|
2021-05-18 15:42:25 -07:00
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":LLVMSupportHeaders",
|
2023-06-22 07:50:38 +02:00
|
|
|
":mlir_c_runner_utils_hdrs",
|
2021-05-18 15:42:25 -07:00
|
|
|
"@cuda//:cuda_headers",
|
2023-05-11 13:56:34 -07:00
|
|
|
"@cuda//:cusparse_static",
|
2021-05-18 15:42:25 -07:00
|
|
|
"@cuda//:libcuda",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-09-07 21:57:02 +02:00
|
|
|
# Indirection to avoid 'libmlir_cuda_runtime.so' filename clash.
|
2022-09-04 10:18:31 +02:00
|
|
|
alias(
|
|
|
|
name = "mlir_cuda_runtime",
|
|
|
|
actual = "_mlir_cuda_runtime",
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "libmlir_cuda_runtime.so",
|
|
|
|
linkshared = True,
|
|
|
|
linkstatic = False,
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
"nobuildkite", # TODO(gcmn): Add support for this target
|
|
|
|
],
|
|
|
|
deps = [":mlir_cuda_runtime"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VulkanRuntime",
|
|
|
|
srcs = ["tools/mlir-vulkan-runner/VulkanRuntime.cpp"],
|
|
|
|
hdrs = ["tools/mlir-vulkan-runner/VulkanRuntime.h"],
|
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
],
|
|
|
|
deps = [
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
"@vulkan_headers",
|
|
|
|
"@vulkan_sdk//:sdk",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
2022-09-04 10:18:31 +02:00
|
|
|
name = "libvulkan-runtime-wrappers.so",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
|
|
|
|
linkshared = True,
|
2023-06-22 07:50:38 +02:00
|
|
|
linkstatic = False,
|
2021-05-18 15:42:25 -07:00
|
|
|
tags = [
|
|
|
|
"manual", # External dependency
|
|
|
|
],
|
2023-06-22 07:50:38 +02:00
|
|
|
deps = [":VulkanRuntime"],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-vulkan-runner",
|
|
|
|
srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ExecutionEngineUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
|
|
|
":FuncToSPIRV",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUToSPIRV",
|
|
|
|
":GPUToVulkanTransforms",
|
|
|
|
":GPUTransforms",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2022-06-16 12:53:49 +02:00
|
|
|
":LLVMIRTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":MemRefDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefTransforms",
|
|
|
|
":MlirJitRunner",
|
|
|
|
":Pass",
|
[mlir] Factor type reconciliation out of Standard-to-LLVM conversion
Conversion to the LLVM dialect is being refactored to be more progressive and
is now performed as a series of independent passes converting different
dialects. These passes may produce `unrealized_conversion_cast` operations that
represent pending conversions between built-in and LLVM dialect types.
Historically, a more monolithic Standard-to-LLVM conversion pass did not need
these casts as all operations were converted in one shot. Previous refactorings
have led to the requirement of running the Standard-to-LLVM conversion pass to
clean up `unrealized_conversion_cast`s even though the IR had no standard
operations in it. The pass must have been also run the last among all to-LLVM
passes, in contradiction with the partial conversion logic. Additionally, the
way it was set up could produce invalid operations by removing casts between
LLVM and built-in types even when the consumer did not accept the uncasted
type, or could lead to cryptic conversion errors (recursive application of the
rewrite pattern on `unrealized_conversion_cast` as a means to indicate failure
to eliminate casts).
In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is not
specific to to-LLVM conversions and can be factored out into a separate type
reconciliation pass, which is achieved in this commit. While the cast operation
itself has a folder pattern, it is insufficient in most conversion passes as
the folder only applies to the second cast. Without complex legality setup in
the conversion target, the conversion infra will either consider the cast
operations valid and not fold them (a separate canonicalization would be
necessary to trigger the folding), or consider the first cast invalid upon
generation and stop with error. The pattern provided by the reconciliation pass
applies to the first cast operation instead. Furthermore, having a separate
pass makes it clear when `unrealized_conversion_cast`s could not have been
eliminated since it is the only reason why this pass can fail.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D109507
2021-09-09 16:06:10 +02:00
|
|
|
":ReconcileUnrealizedCasts",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVTransforms",
|
|
|
|
":ToLLVMIRTranslation",
|
2023-01-05 18:37:49 -05:00
|
|
|
":VectorDialect",
|
|
|
|
":VectorToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-spirv-cpu-runner",
|
|
|
|
srcs = ["tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-03-21 15:00:10 +01:00
|
|
|
":BuiltinToLLVMIRTranslation",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ExecutionEngineUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":GPUToSPIRV",
|
|
|
|
":GPUTransforms",
|
|
|
|
":LLVMDialect",
|
|
|
|
":LLVMToLLVMIRTranslation",
|
|
|
|
":MemRefDialect",
|
|
|
|
":MlirJitRunner",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":SPIRVToLLVM",
|
|
|
|
":SPIRVTransforms",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Linker",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TableGen",
|
|
|
|
srcs = glob(["lib/TableGen/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/TableGen/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TableGen",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MlirTableGenMain",
|
2022-08-06 16:08:48 +02:00
|
|
|
srcs = glob(["lib/Tools/mlir-tblgen/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Tools/mlir-tblgen/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TableGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TableGen",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:config",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-tblgen",
|
|
|
|
srcs = glob([
|
|
|
|
"tools/mlir-tblgen/*.h",
|
|
|
|
"tools/mlir-tblgen/*.cpp",
|
|
|
|
]),
|
|
|
|
deps = [
|
|
|
|
":MlirTableGenMain",
|
|
|
|
":Support",
|
|
|
|
":TableGen",
|
2023-05-03 00:42:24 +09:00
|
|
|
"//llvm:CodeGenTypes",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TableGen",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:config",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-linalg-ods-yaml-gen",
|
|
|
|
srcs = [
|
|
|
|
"tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:TableGen",
|
|
|
|
"//llvm:config",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
## OpenACC dialect
|
|
|
|
|
|
|
|
# TODO(gcmn): This is sticking td files in a cc_library
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AccCommonGen",
|
|
|
|
includes = ["/llvm/include"],
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
2022-01-18 16:53:55 +00:00
|
|
|
[
|
|
|
|
"-gen-directive-decl",
|
|
|
|
"-directives-dialect=OpenACC",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/OpenACC/AccCommon.td",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "//llvm:include/llvm/Frontend/OpenACC/ACC.td",
|
|
|
|
deps = ["//llvm:acc_td_files"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "OpenAccOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/OpenACC/AccCommon.td",
|
2023-04-18 18:18:34 -07:00
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCBase.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOps.td",
|
2023-04-18 18:18:34 -07:00
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenACCOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc",
|
|
|
|
),
|
2022-01-18 16:53:55 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/OpenACC/OpenACCOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td",
|
2023-04-18 18:18:34 -07:00
|
|
|
deps = [
|
|
|
|
":BuiltinDialectTdFiles",
|
2023-05-16 18:27:12 +02:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2023-04-18 18:18:34 -07:00
|
|
|
":OpenAccOpsTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenACCTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"--gen-typedef-decls",
|
|
|
|
"-typedefs-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"--gen-typedef-defs",
|
|
|
|
"-typedefs-dialect=acc",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCOpsTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
|
|
|
|
deps = [":OpenAccOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenACCTypeInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-type-interface-decls"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-defs"],
|
|
|
|
"include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":OpenAccOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "OpenACCDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/OpenACC/IR/*.cpp",
|
|
|
|
"lib/Dialect/OpenACC/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/OpenACC/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-05-16 15:40:04 -07:00
|
|
|
":ControlFlowInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2023-04-18 18:18:34 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenACCOpsIncGen",
|
2023-04-18 18:18:34 -07:00
|
|
|
":OpenACCTypeInterfacesIncGen",
|
|
|
|
":OpenACCTypesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
## OpenMP dialect
|
|
|
|
|
|
|
|
# TODO(gcmn): This is sticking td files in a cc_library
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OmpCommonTdGen",
|
|
|
|
includes = ["/llvm/include"],
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
2022-01-18 16:53:55 +00:00
|
|
|
[
|
|
|
|
"-gen-directive-decl",
|
|
|
|
"-directives-dialect=OpenMP",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/OpenMP/OmpCommon.td",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "//llvm:include/llvm/Frontend/OpenMP/OMP.td",
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
"//llvm:omp_td_files",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "OpenMPOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/OpenMP/OmpCommon.td",
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOps.td",
|
2021-10-07 12:45:53 -07:00
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
|
2022-07-07 17:36:28 -07:00
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":LLVMOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenMPOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=omp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=omp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc",
|
|
|
|
),
|
2022-01-18 16:53:55 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=omp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=omp",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/OpenMP/OpenMPOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
|
|
|
|
deps = [":OpenMPOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-07-07 17:36:28 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenMPTypeInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-type-interface-decls"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-type-interface-defs"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
|
|
|
|
deps = [":OpenMPOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-10-07 12:45:53 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "OpenMPInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
|
|
|
|
deps = [":OpenMPOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "OpenMPDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/OpenMP/IR/*.cpp",
|
|
|
|
"lib/Dialect/OpenMP/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
2023-03-29 09:40:39 +02:00
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"include/mlir/Dialect/OpenMP/*.h",
|
|
|
|
],
|
|
|
|
exclude = ["include/mlir/Dialect/OpenMP/OpenMPInterfaces.h"],
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
2023-03-29 09:40:39 +02:00
|
|
|
textual_hdrs = [
|
|
|
|
"include/mlir/Dialect/OpenMP/OpenMPInterfaces.h",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfaces",
|
2023-05-22 17:11:25 +02:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
2021-10-07 12:45:53 -07:00
|
|
|
":OpenMPInterfacesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenMPOpsIncGen",
|
2022-07-07 17:36:28 -07:00
|
|
|
":OpenMPTypeInterfacesIncGen",
|
2023-01-23 15:38:46 +00:00
|
|
|
"//llvm:FrontendOpenMP",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "OpenACCToSCF",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/OpenACCToSCF/*.cpp",
|
|
|
|
"lib/Conversion/OpenACCToSCF/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/OpenACCToSCF/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":OpenACCDialect",
|
2023-04-18 18:18:34 -07:00
|
|
|
":OpenACCOpsIncGen",
|
|
|
|
":OpenACCTypesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "OpenACCToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/OpenACCToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/OpenACCToLLVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/OpenACCToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":OpenACCDialect",
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "OpenMPToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/OpenMPToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/OpenMPToLLVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/OpenMPToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithToLLVM",
|
2022-02-06 17:21:48 -08:00
|
|
|
":ControlFlowToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2021-07-12 11:24:13 -07:00
|
|
|
":MemRefToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpenMPDialect",
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "QuantizationOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Quant/QuantOps.td",
|
|
|
|
"include/mlir/Dialect/Quant/QuantOpsBase.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "QuantOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Quant/QuantOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Quant/QuantOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/Quant/QuantOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/Quant/QuantOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/QuantOps/QuantOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Quant/QuantOps.td",
|
|
|
|
deps = [":QuantizationOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-06-06 11:16:07 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "QuantDialectBytecodeGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-bytecode",
|
|
|
|
"-bytecode-dialect=Quant",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Quant/QuantDialectBytecode.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Quant/QuantDialectBytecode.td",
|
|
|
|
deps = [
|
|
|
|
":BytecodeTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "QuantOps",
|
|
|
|
srcs = [
|
2022-10-17 16:54:37 -07:00
|
|
|
"lib/Dialect/Quant/IR/QuantDialectBytecode.cpp",
|
2022-10-21 12:23:46 -07:00
|
|
|
"lib/Dialect/Quant/IR/QuantDialectBytecode.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
"lib/Dialect/Quant/IR/QuantOps.cpp",
|
|
|
|
"lib/Dialect/Quant/IR/QuantTypes.cpp",
|
|
|
|
"lib/Dialect/Quant/IR/TypeDetail.h",
|
|
|
|
"lib/Dialect/Quant/IR/TypeParser.cpp",
|
|
|
|
"lib/Dialect/Quant/Utils/FakeQuantSupport.cpp",
|
|
|
|
"lib/Dialect/Quant/Utils/UniformSupport.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Quant/FakeQuantSupport.h",
|
|
|
|
"include/mlir/Dialect/Quant/QuantOps.h",
|
|
|
|
"include/mlir/Dialect/Quant/QuantTypes.h",
|
|
|
|
"include/mlir/Dialect/Quant/UniformSupport.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-03-17 09:24:53 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-04-28 22:51:27 +02:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
2023-06-06 11:16:07 -07:00
|
|
|
":QuantDialectBytecodeGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":QuantOpsIncGen",
|
|
|
|
":SideEffectInterfaces",
|
2022-10-17 16:54:37 -07:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TransformUtils",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-21 12:23:46 -07:00
|
|
|
td_library(
|
|
|
|
name = "IndexOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexDialect.td",
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexEnums.td",
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CastInterfacesTdFiles",
|
2023-01-20 21:56:25 +01:00
|
|
|
":InferIntRangeInterfaceTdFiles",
|
2022-10-21 12:23:46 -07:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IndexOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=index",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=index",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Index/IR/IndexOps.td",
|
|
|
|
deps = [":IndexOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IndexEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=index",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexAttrs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=index",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Index/IR/IndexAttrs.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Index/IR/IndexEnums.td",
|
|
|
|
deps = [":IndexOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "IndexToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/IndexToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/IndexToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/IndexToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
2022-10-24 09:10:30 +02:00
|
|
|
":IndexDialect",
|
2022-10-21 12:23:46 -07:00
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "IndexDialect",
|
|
|
|
srcs = glob(["lib/Dialect/Index/IR/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Index/IR/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2022-10-21 12:23:46 -07:00
|
|
|
":IR",
|
|
|
|
":IndexEnumsIncGen",
|
|
|
|
":IndexOpsIncGen",
|
2023-01-20 21:56:25 +01:00
|
|
|
":InferIntRangeCommon",
|
|
|
|
":InferIntRangeInterface",
|
2022-10-21 12:23:46 -07:00
|
|
|
":InferTypeOpInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "LinalgOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgBase.td",
|
2022-09-26 10:33:08 +00:00
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
|
2023-07-19 11:10:53 +02:00
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-10-18 17:23:42 +02:00
|
|
|
":DestinationStyleOpInterfaceTdFiles",
|
2022-09-26 10:33:08 +00:00
|
|
|
":DialectUtilsTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
|
|
|
":LoopLikeInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
2021-08-30 15:55:30 -07:00
|
|
|
":TilingInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ViewLikeInterfaceTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-29 21:34:41 +09:00
|
|
|
td_library(
|
|
|
|
name = "LinalgTransformOpsTdFiles",
|
2023-04-11 14:06:06 +00:00
|
|
|
srcs = glob([
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/*.td",
|
|
|
|
]),
|
2022-04-29 21:34:41 +09:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
":SCFTdFiles",
|
2022-04-29 21:34:41 +09:00
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=linalg",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=linalg",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.cpp.inc",
|
|
|
|
),
|
[mlir][OpDSL] Add type function attributes.
Previously, OpDSL operation used hardcoded type conversion operations (cast or cast_unsigned). Supporting signed and unsigned casts thus meant implementing two different operations. Type function attributes allow us to define a single operation that has a cast type function attribute which at operation instantiation time may be set to cast or cast_unsigned. We may for example, defina a matmul operation with a cast argument:
```
@linalg_structured_op
def matmul(A=TensorDef(T1, S.M, S.K), B=TensorDef(T2, S.K, S.N), C=TensorDef(U, S.M, S.N, output=True),
cast=TypeFnAttrDef(default=TypeFn.cast)):
C[D.m, D.n] += cast(U, A[D.m, D.k]) * cast(U, B[D.k, D.n])
```
When instantiating the operation the attribute may be set to the desired cast function:
```
linalg.matmul(lhs, rhs, outs=[out], cast=TypeFn.cast_unsigned)
```
The revsion introduces a enum in the Linalg dialect that maps one-by-one to the type functions defined by OpDSL.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D119718
2022-02-25 08:12:34 +00:00
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
|
|
|
|
deps = [":LinalgOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-09-26 10:33:08 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
|
|
|
|
deps = [":LinalgOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-29 21:34:41 +09:00
|
|
|
gentbl_cc_library(
|
2023-04-11 14:06:06 +00:00
|
|
|
name = "LinalgMatchOpsIncGen",
|
2022-04-29 21:34:41 +09:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.h.inc",
|
2022-04-29 21:34:41 +09:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.cpp.inc",
|
2022-04-29 21:34:41 +09:00
|
|
|
),
|
2023-04-11 14:06:06 +00:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.td",
|
|
|
|
deps = [
|
|
|
|
":LinalgTransformEnumsIncGen",
|
|
|
|
":LinalgTransformOpsIncGen",
|
|
|
|
":LinalgTransformOpsTdFiles",
|
|
|
|
":SCFDeviceMappingInterfacesIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgTransformEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
2022-07-21 06:44:43 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.cpp.inc",
|
|
|
|
),
|
2022-04-29 21:34:41 +09:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-04-11 14:06:06 +00:00
|
|
|
td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformEnums.td",
|
|
|
|
deps = [
|
|
|
|
":LinalgTransformOpsTdFiles",
|
|
|
|
":SCFDeviceMappingInterfacesIncGen",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-04-29 21:34:41 +09:00
|
|
|
td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td",
|
|
|
|
deps = [
|
2023-04-11 14:06:06 +00:00
|
|
|
":LinalgTransformEnumsIncGen",
|
2022-04-29 21:34:41 +09:00
|
|
|
":LinalgTransformOpsTdFiles",
|
[mlir] Introduce device mapper attribute for `thread_dim_map` and `mapped to dims`
`scf.foreach_thread` defines mapping its loops to processors via an integer array, see an example below. A lowering can use this mapping. However, expressing mapping as an integer array is very confusing, especially when there are multiple levels of parallelism. In addition, the op does not verify the integer array. This change introduces device mapping attribute to make mapping descriptive and verifiable. Then it makes GPU transform dialect use it.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [0, 1]}
} { thread_dim_mapping = [0, 1]}
```
It first introduces a `DeviceMappingInterface` which is an attribute interface. `scf.foreach_thread` defines its mapping via this interface. A lowering must define its attributes and implement this interface as well. This way gives us a clear validation.
The change also introduces two new attributes (`#gpu.thread<x/y/z>` and `#gpu.block<x,y,z>` ). After this change, the above code prints as below, as seen here, this way clarifies the loop mappings. The change also implements consuming of these two new attribute by the transform dialect. Transform dialect binds the outermost loops to the thread blocks and innermost loops to threads.
```
scf.foreach_thread (%i, %j) in (%c1, %c2) {
scf.foreach_thread (%i2, %j2) in (%c1, %c2)
{...} { thread_dim_mapping = [#gpu.thread<x>, #gpu.thread<y>]}
} { thread_dim_mapping = [#gpu.block<x>, #gpu.block<y>]}
```
Reviewed By: ftynse, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137413
2022-11-10 17:55:49 +01:00
|
|
|
":SCFDeviceMappingInterfacesIncGen",
|
2022-04-29 21:34:41 +09:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
genlinalg(
|
|
|
|
name = "LinalgNamedStructuredOpsYamlIncGen",
|
|
|
|
src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml",
|
|
|
|
linalg_outs = [
|
|
|
|
(
|
|
|
|
"-o-impl=$@",
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"-o-ods-decl=$@",
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
linalggen = ":mlir-linalg-ods-yaml-gen",
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "LinalgStructuredOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":CopyOpInterfaceTdFiles",
|
2022-10-18 17:23:42 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgOpsTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgStructuredOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
|
|
|
|
deps = [":LinalgStructuredOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
|
|
|
|
deps = [":LinalgStructuredOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-11-02 16:05:27 +09:00
|
|
|
td_library(
|
|
|
|
name = "BufferizableOpInterfaceTdFiles",
|
|
|
|
srcs = [
|
2022-01-20 18:14:59 +09:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
|
2021-11-02 16:05:27 +09:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizableOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
2022-01-20 18:14:59 +09:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc",
|
2021-11-02 16:05:27 +09:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
2022-01-20 18:14:59 +09:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.cpp.inc",
|
2021-11-02 16:05:27 +09:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-01-20 18:14:59 +09:00
|
|
|
td_file = "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
|
2021-11-02 16:05:27 +09:00
|
|
|
deps = [
|
|
|
|
":BufferizableOpInterfaceTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "LinalgDocTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/Linalg/IR/LinalgDoc.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":LinalgOpsTdFiles",
|
|
|
|
":LinalgStructuredOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgDocIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/Linalg/LinalgOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
|
|
|
|
deps = [":LinalgDocTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "LinalgToStandard",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/LinalgToStandard/*.cpp",
|
|
|
|
"lib/Conversion/LinalgToStandard/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/LinalgToStandard/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-06-16 12:53:49 +02:00
|
|
|
":LLVMDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgTransforms",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-06-09 23:34:57 +00:00
|
|
|
name = "LinalgDialect",
|
|
|
|
srcs = glob(["lib/Dialect/Linalg/IR/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Linalg/IR/*.h"]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2022-01-25 00:51:41 +09:00
|
|
|
":BufferizationDialect",
|
2022-05-12 13:35:27 +02:00
|
|
|
":ComplexDialect",
|
2022-04-25 09:16:16 +02:00
|
|
|
":ControlFlowInterfaces",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CopyOpInterface",
|
2022-10-18 17:23:42 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
2022-09-26 10:33:08 +00:00
|
|
|
":LinalgEnumsIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgInterfacesIncGen",
|
|
|
|
":LinalgNamedStructuredOpsYamlIncGen",
|
|
|
|
":LinalgOpsIncGen",
|
|
|
|
":LinalgStructuredOpsIncGen",
|
2021-07-08 13:25:46 -07:00
|
|
|
":MathDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":Parser",
|
2021-08-30 15:55:30 -07:00
|
|
|
":SCFDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
2021-08-30 15:55:30 -07:00
|
|
|
":TilingInterface",
|
2023-04-13 14:58:11 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-29 21:34:41 +09:00
|
|
|
cc_library(
|
|
|
|
name = "LinalgTransformOps",
|
2023-04-11 14:06:06 +00:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Linalg/TransformOps/*.cpp",
|
|
|
|
]),
|
2023-04-12 08:10:24 +00:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Linalg/TransformOps/*.h",
|
|
|
|
]),
|
2022-04-29 21:34:41 +09:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-07 15:56:06 +02:00
|
|
|
":AffineDialect",
|
2023-04-11 14:06:06 +00:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2023-07-03 09:15:22 +02:00
|
|
|
":BufferizationTransforms",
|
2023-01-20 11:05:29 +01:00
|
|
|
":DialectUtils",
|
2023-02-20 01:40:18 -08:00
|
|
|
":FuncDialect",
|
2022-09-19 16:38:20 +02:00
|
|
|
":GPUDialect",
|
2022-04-29 21:34:41 +09:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2023-04-11 14:06:06 +00:00
|
|
|
":LinalgMatchOpsIncGen",
|
|
|
|
":LinalgTransformEnumsIncGen",
|
2022-04-29 21:34:41 +09:00
|
|
|
":LinalgTransformOpsIncGen",
|
|
|
|
":LinalgTransforms",
|
2023-01-27 08:24:14 -08:00
|
|
|
":LinalgUtils",
|
2023-04-12 08:10:24 +00:00
|
|
|
":SCFDialect",
|
2022-10-10 16:27:53 +02:00
|
|
|
":SCFTransforms",
|
2023-01-26 23:25:15 +01:00
|
|
|
":Support",
|
2023-01-20 11:05:29 +01:00
|
|
|
":TensorDialect",
|
2023-01-27 08:24:14 -08:00
|
|
|
":TensorUtils",
|
2022-07-19 17:34:39 +02:00
|
|
|
":TilingInterface",
|
2022-04-29 21:34:41 +09:00
|
|
|
":TransformDialect",
|
2022-12-19 07:57:46 +01:00
|
|
|
":TransformDialectUtils",
|
2022-05-30 15:13:23 +02:00
|
|
|
":TransformUtils",
|
2023-04-12 08:10:24 +00:00
|
|
|
":VectorDialect",
|
2023-03-23 08:32:48 -07:00
|
|
|
":VectorTransforms",
|
2022-04-29 21:34:41 +09:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "LinalgPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Linalg",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Linalg/Passes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-header",
|
|
|
|
"--prefix=Linalg",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Linalg/Passes.capi.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-capi-impl",
|
|
|
|
"--prefix=Linalg",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Linalg/Passes.capi.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Linalg/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-06-13 06:50:55 +00:00
|
|
|
cc_library(
|
|
|
|
name = "LinalgUtils",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Linalg/Utils/*.cpp",
|
|
|
|
"lib/Dialect/Linalg/Utils/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Linalg/Utils/*.h",
|
|
|
|
]),
|
|
|
|
deps = [
|
|
|
|
":AffineAnalysis",
|
|
|
|
":AffineDialect",
|
|
|
|
":AffineUtils",
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2022-06-13 06:50:55 +00:00
|
|
|
":DialectUtils",
|
2022-06-22 15:59:53 -07:00
|
|
|
":FuncDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":IR",
|
|
|
|
":LinalgDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":TensorDialect",
|
|
|
|
":TensorUtils",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "LinalgTransforms",
|
2021-11-05 13:55:47 +09:00
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Linalg/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Linalg/Transforms/*.h",
|
2022-06-13 06:50:55 +00:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Linalg/Passes.h",
|
2022-06-13 06:50:55 +00:00
|
|
|
] + glob([
|
|
|
|
"include/mlir/Dialect/Linalg/Transforms/*.h",
|
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-19 00:55:56 +01:00
|
|
|
":AffineAnalysis",
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2023-04-13 14:58:11 +02:00
|
|
|
":AffineTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffineUtils",
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithTransforms",
|
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexDialect",
|
2022-06-09 23:34:57 +00:00
|
|
|
":ControlFlowDialect",
|
2022-10-18 17:23:42 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-02 00:07:56 +01:00
|
|
|
":FuncTransforms",
|
2023-02-27 16:50:39 +01:00
|
|
|
":GPUDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LinalgPassIncGen",
|
|
|
|
":LinalgStructuredOpsIncGen",
|
2022-06-13 06:50:55 +00:00
|
|
|
":LinalgUtils",
|
2023-02-27 01:28:56 -08:00
|
|
|
":LoopLikeInterface",
|
2022-11-24 02:16:46 +00:00
|
|
|
":MaskableOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathDialect",
|
|
|
|
":MemRefDialect",
|
2022-11-23 10:46:46 -08:00
|
|
|
":MemRefTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":SCFTransforms",
|
2022-01-27 09:10:59 +01:00
|
|
|
":SCFUtils",
|
2022-06-13 06:50:55 +00:00
|
|
|
":SparseTensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Support",
|
|
|
|
":TensorDialect",
|
2022-02-16 10:28:51 -05:00
|
|
|
":TensorTilingInterfaceImpl",
|
2022-01-24 23:16:29 +09:00
|
|
|
":TensorTransforms",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TensorUtils",
|
2022-06-13 19:56:32 +00:00
|
|
|
":TilingInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TransformUtils",
|
2022-02-11 07:14:40 +00:00
|
|
|
":Transforms",
|
2023-04-13 14:58:11 +02:00
|
|
|
":ValueBoundsOpInterface",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":VectorToSCF",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorTransforms",
|
|
|
|
":VectorUtils",
|
2021-11-10 13:19:41 +00:00
|
|
|
":X86VectorTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-04-06 02:41:15 +02:00
|
|
|
td_library(
|
|
|
|
name = "ValueBoundsOpInterfaceTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Interfaces/ValueBoundsOpInterface.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ValueBoundsOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Interfaces/ValueBoundsOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Interfaces/ValueBoundsOpInterface.td",
|
|
|
|
deps = [
|
|
|
|
":ValueBoundsOpInterfaceTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ValueBoundsOpInterface",
|
|
|
|
srcs = ["lib/Interfaces/ValueBoundsOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/ValueBoundsOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
|
|
|
":DestinationStyleOpInterface",
|
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
":ValueBoundsOpInterfaceIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-04-06 10:46:48 +09:00
|
|
|
cc_library(
|
|
|
|
name = "ArithValueBoundsOpInterfaceImpl",
|
|
|
|
srcs = ["lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArithDialect",
|
|
|
|
":IR",
|
|
|
|
":ValueBoundsOpInterface",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-08-30 15:55:30 -07:00
|
|
|
cc_library(
|
|
|
|
name = "TilingInterface",
|
|
|
|
srcs = ["lib/Interfaces/TilingInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Interfaces/TilingInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-26 10:33:08 +00:00
|
|
|
":DialectUtils",
|
2021-08-30 15:55:30 -07:00
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
":TilingInterfaceIncGen",
|
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-10 21:21:03 +00:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# Vector dialect.
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
2022-10-26 00:58:56 +00:00
|
|
|
name = "MaskingOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "MaskableOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td"],
|
2022-10-10 21:21:03 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "VectorOpsTdFiles",
|
2022-01-31 19:10:51 +09:00
|
|
|
srcs = ["include/mlir/Dialect/Vector/IR/VectorOps.td"],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-04-13 18:38:11 +00:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-10-27 10:59:52 +02:00
|
|
|
":DestinationStyleOpInterfaceTdFiles",
|
2022-02-18 01:15:14 +01:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2022-10-26 00:58:56 +00:00
|
|
|
":MaskableOpInterfaceTdFiles",
|
|
|
|
":MaskingOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
":VectorInterfacesTdFiles",
|
|
|
|
":ViewLikeInterfaceTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-06-21 06:52:01 -07:00
|
|
|
td_library(
|
|
|
|
name = "VectorTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":PDLDialectTdFiles",
|
|
|
|
":SCFTdFiles",
|
|
|
|
":TransformDialectTdFiles",
|
2023-01-17 13:17:56 +01:00
|
|
|
":VectorTransformsTdFiles",
|
2022-06-21 06:52:01 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-10 21:21:03 +00:00
|
|
|
gentbl_cc_library(
|
2022-10-26 00:58:56 +00:00
|
|
|
name = "MaskableOpInterfaceIncGen",
|
2022-10-10 21:21:03 +00:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
2022-10-26 00:58:56 +00:00
|
|
|
"include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h.inc",
|
2022-10-10 21:21:03 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
2022-10-26 00:58:56 +00:00
|
|
|
"include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.cpp.inc",
|
2022-10-10 21:21:03 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-10-26 00:58:56 +00:00
|
|
|
td_file = "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td",
|
|
|
|
deps = [":MaskableOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MaskingOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td",
|
|
|
|
deps = [":MaskingOpInterfaceTdFiles"],
|
2022-10-10 21:21:03 +00:00
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "VectorOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOps.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOps.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=vector",
|
|
|
|
],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsDialect.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=vector",
|
|
|
|
],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsDialect.cpp.inc",
|
2021-06-28 22:54:11 +00:00
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsEnums.h.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
2022-01-31 19:10:51 +09:00
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsEnums.cpp.inc",
|
2021-05-18 15:42:25 -07:00
|
|
|
),
|
2022-09-07 13:33:02 +02:00
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/Vector/VectorOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-01-31 19:10:51 +09:00
|
|
|
td_file = "include/mlir/Dialect/Vector/IR/VectorOps.td",
|
2021-05-18 15:42:25 -07:00
|
|
|
deps = [":VectorOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-06-21 06:52:01 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "VectorTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":VectorTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-10 21:21:03 +00:00
|
|
|
cc_library(
|
2022-10-26 00:58:56 +00:00
|
|
|
name = "MaskableOpInterface",
|
|
|
|
srcs = ["lib/Dialect/Vector/Interfaces/MaskableOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":MaskableOpInterfaceIncGen",
|
|
|
|
":MaskingOpInterface",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MaskingOpInterface",
|
|
|
|
srcs = ["lib/Dialect/Vector/Interfaces/MaskingOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h"],
|
2022-10-10 21:21:03 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
2022-10-26 00:58:56 +00:00
|
|
|
":MaskingOpInterfaceIncGen",
|
2022-10-10 21:21:03 +00:00
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VectorToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/VectorToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/VectorToLLVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/VectorToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AMXDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AMXTransforms",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmNeonDialect",
|
2023-06-16 13:20:32 +02:00
|
|
|
":ArmSMEDialect",
|
|
|
|
":ArmSMETransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":ArmSVEDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ArmSVETransforms",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-12 11:24:13 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
2023-02-15 07:36:00 +01:00
|
|
|
":MaskableOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":ToLLVMIRTranslation",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorTransforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":X86VectorTransforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-18 16:02:15 +02:00
|
|
|
cc_library(
|
|
|
|
name = "VectorToArmSME",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/VectorToArmSME/*.cpp",
|
|
|
|
"lib/Conversion/VectorToArmSME/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/VectorToArmSME/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ArmSMEDialect",
|
2023-07-25 11:38:35 +02:00
|
|
|
":ArmSMEUtils",
|
2023-07-18 16:02:15 +02:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "VectorToGPU",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/VectorToGPU/*.cpp",
|
|
|
|
"lib/Conversion/VectorToGPU/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/VectorToGPU/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":GPUDialect",
|
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
2022-06-13 06:50:55 +00:00
|
|
|
":NVGPUDialect",
|
2023-01-17 15:22:30 -08:00
|
|
|
":NVGPUUtils",
|
2022-05-20 18:03:20 +02:00
|
|
|
":NVVMDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2023-03-09 15:13:28 -05:00
|
|
|
":VectorTransforms",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "VectorToSCF",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/VectorToSCF/*.cpp",
|
|
|
|
"lib/Conversion/VectorToSCF/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/VectorToSCF/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-03-08 08:55:55 +01:00
|
|
|
":FuncToLLVM",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":Support",
|
2023-01-31 17:05:49 -08:00
|
|
|
":TensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorTransforms",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "TosaDialectTdFiles",
|
|
|
|
srcs = glob(["include/mlir/Dialect/Tosa/IR/*.td"]),
|
|
|
|
deps = [
|
2021-07-01 17:44:52 -07:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LoopLikeInterfaceTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
2023-02-13 16:51:37 -05:00
|
|
|
":VectorInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TosaDialectIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaOpsDialect.cpp.inc",
|
|
|
|
),
|
2022-06-09 21:34:45 +00:00
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaAttributes.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
(
|
|
|
|
["-gen-op-doc"],
|
|
|
|
"g3doc/Dialects/Tosa/TosaOps.md",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td",
|
|
|
|
deps = [":TosaDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TosaInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td",
|
|
|
|
deps = [":TosaDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TosaPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=TosaOpt",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tosa/Transforms/Passes.h.inc",
|
|
|
|
),
|
2022-11-15 07:48:51 +01:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-enum-decls",
|
|
|
|
"-name=TosaOpt",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tosa/Transforms/PassesEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-enum-defs",
|
|
|
|
"-name=TosaOpt",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Tosa/Transforms/PassesEnums.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Tosa/Transforms/Passes.td",
|
2022-11-15 07:48:51 +01:00
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":PassBaseTdFiles",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TosaDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Tosa/IR/*.cpp",
|
|
|
|
"lib/Dialect/Tosa/IR/*.h",
|
|
|
|
"lib/Dialect/Tosa/Utils/*.cpp",
|
|
|
|
"lib/Dialect/Tosa/Transforms/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/Tosa/IR/*.h",
|
|
|
|
"include/mlir/Dialect/Tosa/Utils/*.h",
|
|
|
|
"include/mlir/Dialect/Tosa/Transforms/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2021-07-02 09:09:59 -07:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Dialect",
|
2022-01-12 14:10:27 -08:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-01 17:44:52 -07:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LoopLikeInterface",
|
|
|
|
":Pass",
|
|
|
|
":QuantOps",
|
2023-07-05 14:32:42 +02:00
|
|
|
":Support",
|
2021-06-23 09:25:36 -07:00
|
|
|
":TensorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TosaDialectIncGen",
|
|
|
|
":TosaInterfacesIncGen",
|
|
|
|
":TosaPassIncGen",
|
|
|
|
":TransformUtils",
|
2023-02-13 19:27:55 -08:00
|
|
|
":VectorInterfaces",
|
2021-08-04 08:49:30 +02:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-04 12:22:09 -07:00
|
|
|
cc_library(
|
|
|
|
name = "TosaToArith",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/TosaToArith/*.cpp",
|
|
|
|
"lib/Conversion/TosaToArith/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2022-04-04 12:22:09 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/TosaToArith/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/TosaToArith",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-04-04 12:22:09 -07:00
|
|
|
":ConversionPassIncGen",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":TosaDialect",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "TosaToLinalg",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/TosaToLinalg/*.cpp",
|
|
|
|
"lib/Conversion/TosaToLinalg/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/TosaToLinalg/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/TosaToLinalg",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-05-31 01:37:14 +00:00
|
|
|
":ArithUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2021-07-07 16:50:23 -07:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-06-09 23:34:57 +00:00
|
|
|
":LinalgDialect",
|
2023-05-31 01:37:14 +00:00
|
|
|
":LinalgUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
2021-09-09 15:57:22 -07:00
|
|
|
":SCFDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TensorDialect",
|
2022-01-21 19:29:08 +01:00
|
|
|
":TensorUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TosaDialect",
|
|
|
|
":Transforms",
|
2023-07-22 13:21:51 +02:00
|
|
|
"//llvm:Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TosaToSCF",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/TosaToSCF/*.cpp",
|
|
|
|
"lib/Conversion/TosaToSCF/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/TosaToSCF/*.h",
|
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
|
|
|
"lib/Conversion/TosaToSCF",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
2022-08-31 13:31:11 +02:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SCFDialect",
|
|
|
|
":TensorDialect",
|
|
|
|
":TosaDialect",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-04-04 12:22:09 -07:00
|
|
|
name = "TosaToTensor",
|
2021-05-18 15:42:25 -07:00
|
|
|
srcs = glob([
|
2022-04-04 12:22:09 -07:00
|
|
|
"lib/Conversion/TosaToTensor/*.cpp",
|
|
|
|
"lib/Conversion/TosaToTensor/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
2022-04-04 12:22:09 -07:00
|
|
|
"include/mlir/Conversion/TosaToTensor/*.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
]),
|
|
|
|
includes = [
|
|
|
|
"include",
|
2022-04-04 12:22:09 -07:00
|
|
|
"lib/Conversion/TosaToTensor",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-06-15 19:50:08 +00:00
|
|
|
":ArithUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":TensorDialect",
|
2023-06-15 19:50:08 +00:00
|
|
|
":TensorUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TosaDialect",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
td_library(
|
|
|
|
name = "TransformDialectTdFiles",
|
|
|
|
srcs = glob(["include/mlir/Dialect/Transform/IR/*.td"]),
|
|
|
|
deps = [
|
2022-10-04 11:49:21 +00:00
|
|
|
":CastInterfacesTdFiles",
|
2022-05-25 15:57:22 +02:00
|
|
|
":ControlFlowInterfacesTdFiles",
|
2022-10-05 14:23:19 +00:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
":OpBaseTdFiles",
|
2022-04-22 10:26:53 +02:00
|
|
|
":SideEffectInterfacesTdFiles",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-08-12 13:53:46 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformDialectEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-enum-decls",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformDialectEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-enum-defs",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformDialectEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/TransformAttrs.td",
|
|
|
|
deps = [":TransformDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
gentbl_cc_library(
|
2023-04-11 14:06:06 +00:00
|
|
|
name = "TransformDialectMatchInterfacesIncGen",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-decls",
|
|
|
|
],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Transform/IR/MatchInterfaces.h.inc",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-defs",
|
|
|
|
],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Transform/IR/MatchInterfaces.cpp.inc",
|
2022-10-04 11:49:21 +00:00
|
|
|
),
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-04-11 14:06:06 +00:00
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/MatchInterfaces.td",
|
|
|
|
deps = [
|
|
|
|
":TransformDialectInterfacesIncGen",
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
)
|
|
|
|
|
2023-04-03 12:59:49 +00:00
|
|
|
gentbl_cc_library(
|
2023-04-11 14:06:06 +00:00
|
|
|
name = "TransformDialectInterfacesIncGen",
|
2023-04-03 12:59:49 +00:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-decls",
|
|
|
|
],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Transform/IR/TransformInterfaces.h.inc",
|
2023-04-03 12:59:49 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-interface-defs",
|
|
|
|
],
|
2023-04-11 14:06:06 +00:00
|
|
|
"include/mlir/Dialect/Transform/IR/TransformInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-type-interface-decls",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformTypeInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-type-interface-defs",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformTypeInterfaces.cpp.inc",
|
2023-04-03 12:59:49 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2023-04-11 14:06:06 +00:00
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/TransformInterfaces.td",
|
|
|
|
deps = [":TransformDialectTdFiles"],
|
2023-04-03 12:59:49 +00:00
|
|
|
)
|
|
|
|
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformDialectIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/TransformDialect.td",
|
|
|
|
deps = [":TransformDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-19 16:36:37 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/TransformOps.td",
|
2023-03-20 16:18:35 +00:00
|
|
|
deps = [
|
|
|
|
":CallInterfacesTdFiles",
|
2023-03-21 15:23:13 -07:00
|
|
|
":FunctionInterfacesTdFiles",
|
2023-03-21 14:40:17 -07:00
|
|
|
":TransformDialectTdFiles",
|
2023-03-20 16:18:35 +00:00
|
|
|
],
|
2022-04-19 16:36:37 +02:00
|
|
|
)
|
|
|
|
|
2022-10-04 11:49:21 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/Transform/IR/TransformTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/IR/TransformTypes.td",
|
|
|
|
deps = [":TransformDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
cc_library(
|
|
|
|
name = "TransformDialect",
|
|
|
|
srcs = glob(["lib/Dialect/Transform/IR/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Transform/IR/*.h"]),
|
|
|
|
deps = [
|
2023-03-21 15:23:13 -07:00
|
|
|
":Analysis",
|
2023-03-21 14:40:17 -07:00
|
|
|
":CallOpInterfaces",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2022-05-25 15:57:22 +02:00
|
|
|
":ControlFlowInterfaces",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
":IR",
|
2023-07-03 15:24:35 +02:00
|
|
|
":LoopLikeInterface",
|
2023-06-20 08:54:49 +02:00
|
|
|
":Pass",
|
2022-04-20 12:57:23 +02:00
|
|
|
":Rewrite",
|
2022-04-22 10:26:53 +02:00
|
|
|
":SideEffectInterfaces",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
":Support",
|
2022-08-12 13:53:46 +00:00
|
|
|
":TransformDialectEnumsIncGen",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
":TransformDialectIncGen",
|
|
|
|
":TransformDialectInterfacesIncGen",
|
2023-04-03 12:59:49 +00:00
|
|
|
":TransformDialectMatchInterfacesIncGen",
|
2023-01-02 17:11:40 +00:00
|
|
|
":TransformDialectUtils",
|
2022-04-19 16:36:37 +02:00
|
|
|
":TransformOpsIncGen",
|
2022-10-04 11:49:21 +00:00
|
|
|
":TransformTypesIncGen",
|
2023-03-28 13:11:47 -07:00
|
|
|
":Transforms",
|
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
2022-04-14 13:16:48 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-05-22 14:36:58 +00:00
|
|
|
td_library(
|
|
|
|
name = "TransformPDLExtensionTdFiles",
|
|
|
|
srcs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.td"]),
|
|
|
|
deps = [
|
|
|
|
":PDLDialectTdFiles",
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformPDLExtensionOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-decls",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-op-defs",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.td",
|
|
|
|
deps = [":TransformPDLExtensionTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TransformPDLExtension",
|
|
|
|
srcs = glob(["lib/Dialect/Transform/PDLExtension/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.h"]),
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLInterpDialect",
|
2023-05-26 14:16:47 -07:00
|
|
|
":Rewrite",
|
2023-05-22 14:36:58 +00:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":Support",
|
|
|
|
":TransformDialect",
|
|
|
|
":TransformPDLExtensionOpsIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-05-25 15:57:22 +02:00
|
|
|
td_library(
|
|
|
|
name = "TransformDialectTransformsTdFiles",
|
|
|
|
srcs = glob(["include/mlir/Dialect/Transform/Transforms/*.td"]),
|
|
|
|
deps = [
|
|
|
|
":PassBaseTdFiles",
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "TransformDialectTransformsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Transform",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Transform/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Transform/Transforms/Passes.td",
|
|
|
|
deps = [":TransformDialectTransformsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "TransformDialectTransforms",
|
|
|
|
srcs = glob(["lib/Dialect/Transform/Transforms/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Transform/Transforms/*.h"]),
|
|
|
|
deps = [
|
|
|
|
":Analysis",
|
|
|
|
":IR",
|
2023-01-27 16:01:26 +00:00
|
|
|
":Parser",
|
2022-05-25 15:57:22 +02:00
|
|
|
":Pass",
|
|
|
|
":SideEffectInterfaces",
|
2023-01-27 16:01:26 +00:00
|
|
|
":Support",
|
2022-05-25 15:57:22 +02:00
|
|
|
":TransformDialect",
|
|
|
|
":TransformDialectTransformsIncGen",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-12-19 07:57:46 +01:00
|
|
|
cc_library(
|
|
|
|
name = "TransformDialectUtils",
|
2023-01-02 17:11:40 +00:00
|
|
|
srcs = glob(["lib/Dialect/Transform/Utils/*cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Transform/Utils/*.h"]),
|
2022-12-19 07:57:46 +01:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DialectUtils",
|
|
|
|
":IR",
|
|
|
|
":Support",
|
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "ComplexOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexBase.td",
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-01 11:40:39 +02:00
|
|
|
":BuiltinDialectTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-07-27 16:12:58 +02:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ComplexAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Complex/IR/ComplexAttributes.td",
|
|
|
|
deps = [":ComplexOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ComplexBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=complex",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=complex",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Complex/IR/ComplexBase.td",
|
|
|
|
deps = [":ComplexOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ComplexOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Complex/IR/ComplexOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Complex/IR/ComplexOps.td",
|
|
|
|
deps = [":ComplexOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ComplexDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Complex/IR/*.cpp",
|
|
|
|
"lib/Dialect/Complex/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = ["include/mlir/Dialect/Complex/IR/Complex.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-07-27 16:12:58 +02:00
|
|
|
":ComplexAttributesIncGen",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexBaseIncGen",
|
|
|
|
":ComplexOpsIncGen",
|
|
|
|
":IR",
|
2022-01-26 23:24:45 +01:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ComplexToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ComplexToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/ComplexToLLVM/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/ComplexToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexDialect",
|
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2021-07-07 16:50:23 -07:00
|
|
|
":LLVMCommonConversion",
|
2021-05-18 15:42:25 -07:00
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-05-13 17:12:11 +02:00
|
|
|
cc_library(
|
|
|
|
name = "ComplexToLibm",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ComplexToLibm/*.cpp",
|
|
|
|
"lib/Conversion/ComplexToLibm/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2022-05-13 17:12:11 +02:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/ComplexToLibm/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ComplexDialect",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":DialectUtils",
|
|
|
|
":FuncDialect",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-03-30 08:49:57 -07:00
|
|
|
cc_library(
|
|
|
|
name = "ComplexToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ComplexToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/ComplexToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/ComplexToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ComplexDialect",
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVCommonConversion",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "ComplexToStandard",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/ComplexToStandard/*.cpp",
|
|
|
|
"lib/Conversion/ComplexToStandard/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/ComplexToStandard/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ComplexDialect",
|
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"include/mlir/Interfaces/CallInterfaces.h",
|
|
|
|
"include/mlir/Interfaces/CastInterfaces.h",
|
|
|
|
"include/mlir/Interfaces/ControlFlowInterfaces.h",
|
|
|
|
"include/mlir/Transforms/InliningUtils.h",
|
|
|
|
])
|
|
|
|
|
2021-09-21 20:54:07 +00:00
|
|
|
td_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithOpsTdFiles",
|
2021-09-21 20:54:07 +00:00
|
|
|
srcs = [
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithBase.td",
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOps.td",
|
2021-09-21 20:54:07 +00:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-10-26 17:45:25 -04:00
|
|
|
":ArithOpsInterfacesTdFiles",
|
2022-08-01 11:40:39 +02:00
|
|
|
":BuiltinDialectTdFiles",
|
2021-10-12 23:14:57 +00:00
|
|
|
":CastInterfacesTdFiles",
|
2022-06-14 23:45:52 +02:00
|
|
|
":InferIntRangeInterfaceTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-09-21 20:54:07 +00:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
":VectorInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-26 17:45:25 -04:00
|
|
|
td_library(
|
|
|
|
name = "ArithOpsInterfacesTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-09-21 20:54:07 +00:00
|
|
|
gentbl_cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithBaseIncGen",
|
2021-09-21 20:54:07 +00:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=arith",
|
|
|
|
],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsDialect.h.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=arith",
|
|
|
|
],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsDialect.cpp.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsEnums.h.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsEnums.cpp.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-09-29 11:14:47 -04:00
|
|
|
td_file = "include/mlir/Dialect/Arith/IR/ArithBase.td",
|
|
|
|
deps = [":ArithOpsTdFiles"],
|
2021-09-21 20:54:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithOpsIncGen",
|
2021-09-21 20:54:07 +00:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOps.h.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOps.cpp.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
2022-10-26 17:45:25 -04:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-decls",
|
|
|
|
"-attrdefs-dialect=arith",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-attrdef-defs",
|
|
|
|
"-attrdefs-dialect=arith",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsAttributes.cpp.inc",
|
|
|
|
),
|
2021-09-21 20:54:07 +00:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-09-29 11:14:47 -04:00
|
|
|
td_file = "include/mlir/Dialect/Arith/IR/ArithOps.td",
|
2021-09-21 20:54:07 +00:00
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithOpsTdFiles",
|
2021-09-21 20:54:07 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-10-26 17:45:25 -04:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ArithOpsInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
|
|
|
|
deps = [
|
|
|
|
":ArithOpsInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-09-21 20:54:07 +00:00
|
|
|
gentbl_cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithCanonicalizationIncGen",
|
|
|
|
strip_include_prefix = "include/mlir/Dialect/Arith/IR",
|
2021-09-21 20:54:07 +00:00
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-rewriters"],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/ArithCanonicalization.inc",
|
2021-09-21 20:54:07 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-09-29 11:14:47 -04:00
|
|
|
td_file = "lib/Dialect/Arith/IR/ArithCanonicalization.td",
|
2021-09-21 20:54:07 +00:00
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithOpsTdFiles",
|
2021-09-21 20:54:07 +00:00
|
|
|
":CastInterfacesTdFiles",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncTdFiles",
|
2021-09-21 20:54:07 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithDialect",
|
2023-04-06 10:46:48 +09:00
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/Arith/IR/ArithDialect.cpp",
|
|
|
|
"lib/Dialect/Arith/IR/ArithOps.cpp",
|
|
|
|
"lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp",
|
|
|
|
],
|
2021-09-21 20:54:07 +00:00
|
|
|
hdrs = [
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/IR/Arith.h",
|
2021-09-21 20:54:07 +00:00
|
|
|
"include/mlir/Transforms/InliningUtils.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithBaseIncGen",
|
|
|
|
":ArithCanonicalizationIncGen",
|
|
|
|
":ArithOpsIncGen",
|
2022-10-26 17:45:25 -04:00
|
|
|
":ArithOpsInterfacesIncGen",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2021-09-21 20:54:07 +00:00
|
|
|
":CommonFolders",
|
|
|
|
":IR",
|
2023-01-20 21:56:25 +01:00
|
|
|
":InferIntRangeCommon",
|
2022-06-14 23:45:52 +02:00
|
|
|
":InferIntRangeInterface",
|
2022-02-03 01:41:03 +01:00
|
|
|
":InferTypeOpInterface",
|
2021-09-21 20:54:07 +00:00
|
|
|
":SideEffectInterfaces",
|
|
|
|
":VectorInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-10-12 23:14:57 +00:00
|
|
|
gentbl_cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithPassIncGen",
|
2021-10-12 23:14:57 +00:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
2022-09-29 11:14:47 -04:00
|
|
|
"-name=Arith",
|
2021-10-12 23:14:57 +00:00
|
|
|
],
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/Transforms/Passes.h.inc",
|
2021-10-12 23:14:57 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
2022-09-29 11:14:47 -04:00
|
|
|
td_file = "include/mlir/Dialect/Arith/Transforms/Passes.td",
|
2021-10-12 23:14:57 +00:00
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithTransforms",
|
2021-10-12 23:14:57 +00:00
|
|
|
srcs = glob([
|
2022-09-29 11:14:47 -04:00
|
|
|
"lib/Dialect/Arith/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Arith/Transforms/*.h",
|
2021-10-12 23:14:57 +00:00
|
|
|
]),
|
2022-09-09 09:31:13 +02:00
|
|
|
hdrs = glob([
|
2022-09-29 11:14:47 -04:00
|
|
|
"include/mlir/Dialect/Arith/Transforms/*.h",
|
2022-09-09 09:31:13 +02:00
|
|
|
]),
|
2021-10-12 23:14:57 +00:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-14 23:55:50 +02:00
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithPassIncGen",
|
|
|
|
":ArithUtils",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationTransforms",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2022-09-09 09:31:13 +02:00
|
|
|
":FuncTransforms",
|
2021-10-12 23:14:57 +00:00
|
|
|
":IR",
|
2022-09-08 22:11:44 +00:00
|
|
|
":InferIntRangeInterface",
|
2021-10-12 23:14:57 +00:00
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
2022-11-17 14:10:16 -05:00
|
|
|
":Support",
|
2023-04-18 16:44:44 +09:00
|
|
|
":TensorDialect",
|
2022-01-28 01:11:22 +09:00
|
|
|
":TransformUtils",
|
2022-09-08 22:11:44 +00:00
|
|
|
":Transforms",
|
2023-04-18 16:44:44 +09:00
|
|
|
":ValueBoundsOpInterface",
|
2022-09-09 09:31:13 +02:00
|
|
|
":VectorDialect",
|
2022-01-28 01:11:22 +09:00
|
|
|
"//llvm:Support",
|
2021-10-12 23:14:57 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-03 01:41:03 +01:00
|
|
|
cc_library(
|
2022-09-29 11:14:47 -04:00
|
|
|
name = "ArithUtils",
|
2022-02-03 01:41:03 +01:00
|
|
|
srcs = glob([
|
2022-09-29 11:14:47 -04:00
|
|
|
"lib/Dialect/Arith/Utils/*.cpp",
|
2022-02-03 01:41:03 +01:00
|
|
|
]),
|
2022-09-29 11:14:47 -04:00
|
|
|
hdrs = ["include/mlir/Dialect/Arith/Utils/Utils.h"],
|
2022-02-03 01:41:03 +01:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2023-07-18 09:20:13 +02:00
|
|
|
":ComplexDialect",
|
2022-02-03 01:41:03 +01:00
|
|
|
":IR",
|
2022-02-06 17:21:48 -08:00
|
|
|
"//llvm:Support",
|
2022-02-03 01:41:03 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "MathOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Math/IR/MathBase.td",
|
|
|
|
"include/mlir/Dialect/Math/IR/MathOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-11-04 19:06:44 +01:00
|
|
|
":ArithOpsTdFiles",
|
2021-11-21 14:41:11 -08:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
":VectorInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MathBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=math",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Math/IR/MathOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=math",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Math/IR/MathOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Math/IR/MathBase.td",
|
|
|
|
deps = [":MathOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MathOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Math/IR/MathOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Math/IR/MathOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Math/IR/MathOps.td",
|
|
|
|
deps = [":MathOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2023-06-18 17:51:56 +00:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MathPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Math",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Math/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Math/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MathDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Math/IR/*.cpp",
|
|
|
|
"lib/Dialect/Math/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Math/IR/Math.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-04-12 13:47:51 +02:00
|
|
|
":CommonFolders",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
2022-04-28 22:51:27 +02:00
|
|
|
":InferTypeOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MathBaseIncGen",
|
|
|
|
":MathOpsIncGen",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":VectorInterfaces",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MathTransforms",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/Math/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Math/Transforms/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Math/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":MathDialect",
|
2023-06-18 17:51:56 +00:00
|
|
|
":MathPassIncGen",
|
2023-06-19 09:26:17 +02:00
|
|
|
":Pass",
|
2022-06-01 22:49:34 +02:00
|
|
|
":SCFDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorUtils",
|
2022-06-13 06:50:55 +00:00
|
|
|
":X86VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MathToLibm",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/MathToLibm/*.cpp",
|
|
|
|
"lib/Conversion/MathToLibm/*.h",
|
2022-08-31 13:31:11 +02:00
|
|
|
]),
|
2021-05-18 15:42:25 -07:00
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/MathToLibm/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ConversionPassIncGen",
|
2022-01-31 19:10:51 +09:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":LLVMDialect",
|
|
|
|
":MathDialect",
|
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
":Transforms",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2022-01-31 19:10:51 +09:00
|
|
|
":VectorUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Core",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "MemRefOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefBase.td",
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithOpsTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":CastInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
|
|
|
":CopyOpInterfaceTdFiles",
|
2023-05-22 13:07:45 +02:00
|
|
|
":MemorySlotInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":OpBaseTdFiles",
|
2022-10-03 13:53:16 +09:00
|
|
|
":ShapedOpInterfacesTdFiles",
|
2021-05-18 15:42:25 -07:00
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
":ViewLikeInterfaceTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MemRefBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=memref",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=memref",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
|
|
|
|
deps = [":MemRefOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MemRefOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
|
2022-10-03 13:53:16 +09:00
|
|
|
deps = [
|
|
|
|
":MemRefOpsTdFiles",
|
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MemRefDialect",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/MemRef/IR/*.cpp",
|
|
|
|
"lib/Dialect/MemRef/IR/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRef.h",
|
2023-05-24 11:14:18 +02:00
|
|
|
"include/mlir/Dialect/MemRef/IR/MemRefMemorySlot.h",
|
2023-04-06 10:35:12 +09:00
|
|
|
"include/mlir/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.h",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithUtils",
|
2023-06-02 08:32:01 +02:00
|
|
|
":CastInterfaces",
|
2023-05-05 11:45:05 +02:00
|
|
|
":ComplexDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":CopyOpInterface",
|
2021-06-27 08:30:54 -07:00
|
|
|
":DialectUtils",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
|
|
|
":MemRefBaseIncGen",
|
|
|
|
":MemRefOpsIncGen",
|
2023-05-22 13:07:45 +02:00
|
|
|
":MemorySlotInterfaces",
|
2022-10-03 13:53:16 +09:00
|
|
|
":ShapedOpInterfaces",
|
2023-05-24 11:14:18 +02:00
|
|
|
":Support",
|
2023-04-06 10:35:12 +09:00
|
|
|
":ValueBoundsOpInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":ViewLikeInterface",
|
|
|
|
"//llvm:Support",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-11 14:13:07 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MemRefUtils",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/MemRef/Utils/*.cpp",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/MemRef/Utils/MemRefUtils.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineDialect",
|
|
|
|
":ArithUtils",
|
|
|
|
":MemRefDialect",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MemRefPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=MemRef",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/MemRef/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MemRef/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MemRefTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/MemRef/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/MemRef/Transforms/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/MemRef/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2023-05-04 14:07:19 +09:00
|
|
|
":AffineTransforms",
|
2022-01-24 21:21:37 -08:00
|
|
|
":AffineUtils",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
|
|
|
":ArithTransforms",
|
|
|
|
":ArithUtils",
|
2023-02-15 15:26:14 +01:00
|
|
|
":BufferizationDialect",
|
2022-12-21 10:51:10 +01:00
|
|
|
":ControlFlowDialect",
|
2022-08-28 09:56:17 +02:00
|
|
|
":DialectUtils",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2023-03-15 17:49:27 +00:00
|
|
|
":GPUDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":IR",
|
|
|
|
":InferTypeOpInterface",
|
2022-02-15 23:49:32 -08:00
|
|
|
":LoopLikeInterface",
|
2021-05-18 15:42:25 -07:00
|
|
|
":MemRefDialect",
|
|
|
|
":MemRefPassIncGen",
|
2023-07-11 14:13:07 -07:00
|
|
|
":MemRefUtils",
|
2023-03-23 15:41:14 +01:00
|
|
|
":NVGPUDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
":Pass",
|
2022-12-21 10:51:10 +01:00
|
|
|
":RuntimeVerifiableOpInterface",
|
2023-03-28 11:06:54 -07:00
|
|
|
":Support",
|
2021-05-18 15:42:25 -07:00
|
|
|
":TensorDialect",
|
|
|
|
":Transforms",
|
2023-05-04 14:07:19 +09:00
|
|
|
":ValueBoundsOpInterface",
|
2022-06-13 06:50:55 +00:00
|
|
|
":VectorDialect",
|
2021-05-18 15:42:25 -07:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-09-29 00:12:46 +02:00
|
|
|
td_library(
|
|
|
|
name = "MemRefTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MemRefTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":MemRefTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MemRefTransformOps",
|
|
|
|
srcs = glob(["lib/Dialect/MemRef/TransformOps/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/MemRef/TransformOps/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AffineDialect",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-09-29 00:12:46 +02:00
|
|
|
":IR",
|
2023-02-10 17:21:38 +01:00
|
|
|
":LoopLikeInterface",
|
2022-09-29 00:12:46 +02:00
|
|
|
":MemRefDialect",
|
|
|
|
":MemRefTransformOpsIncGen",
|
|
|
|
":MemRefTransforms",
|
2023-03-23 15:41:14 +01:00
|
|
|
":NVGPUDialect",
|
2023-05-04 14:07:19 +09:00
|
|
|
":SCFDialect",
|
2022-09-29 00:12:46 +02:00
|
|
|
":TransformDialect",
|
2023-03-23 15:41:14 +01:00
|
|
|
":TransformUtils",
|
|
|
|
":VectorDialect",
|
2022-09-29 00:12:46 +02:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-13 20:16:04 -07:00
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# MLProgram dialect
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "MLProgramOpsTdFiles",
|
|
|
|
srcs = [
|
2022-04-22 19:59:34 -07:00
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
|
2022-05-20 18:03:20 +02:00
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramBase.td",
|
2022-04-13 20:16:04 -07:00
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
|
2022-05-31 13:46:06 -07:00
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
|
2022-04-13 20:16:04 -07:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-08-01 11:40:39 +02:00
|
|
|
":BuiltinDialectTdFiles",
|
2022-04-13 20:16:04 -07:00
|
|
|
":CallInterfacesTdFiles",
|
|
|
|
":ControlFlowInterfacesTdFiles",
|
|
|
|
":FunctionInterfacesTdFiles",
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":RegionKindInterfaceIncGen",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MLProgramOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
|
|
|
|
deps = [":MLProgramOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-22 19:59:34 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MLProgramAttributesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
|
|
|
|
deps = [":MLProgramOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-05-31 13:46:06 -07:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "MLProgramTypesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/MLProgramTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
|
|
|
|
deps = [":MLProgramOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-04-13 20:16:04 -07:00
|
|
|
cc_library(
|
|
|
|
name = "MLProgramDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/MLProgram/IR/*.cpp",
|
|
|
|
"lib/Dialect/MLProgram/IR/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Dialect/MLProgram/IR/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ControlFlowInterfaces",
|
|
|
|
":IR",
|
2022-04-22 19:59:34 -07:00
|
|
|
":MLProgramAttributesIncGen",
|
2022-04-13 20:16:04 -07:00
|
|
|
":MLProgramOpsIncGen",
|
2022-05-31 13:46:06 -07:00
|
|
|
":MLProgramTypesIncGen",
|
2022-04-13 20:16:04 -07:00
|
|
|
":Pass",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
# Allocation interfaces
|
|
|
|
##---------------------------------------------------------------------------##
|
|
|
|
|
2021-11-23 10:04:47 +01:00
|
|
|
td_library(
|
|
|
|
name = "AllocationOpInterfaceTdFiles",
|
|
|
|
srcs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "AllocationOpInterfaceIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-interface-decls"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-interface-defs"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td",
|
|
|
|
deps = [":AllocationOpInterfaceTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "AllocationOpInterface",
|
|
|
|
srcs = ["lib/Dialect/Bufferization/IR/AllocationOpInterface.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllocationOpInterfaceIncGen",
|
|
|
|
":IR",
|
2021-11-25 11:42:16 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "BufferizationOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
|
2022-11-14 18:57:52 +01:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
|
2022-11-14 19:02:56 +01:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
|
2021-11-25 11:42:16 +01:00
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllocationOpInterfaceTdFiles",
|
|
|
|
":CopyOpInterfaceTdFiles",
|
2022-05-21 02:31:07 +02:00
|
|
|
":InferTypeOpInterfaceTdFiles",
|
2021-11-25 11:42:16 +01:00
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizationBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=bufferization",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=bufferization",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
|
|
|
|
deps = [":BufferizationOpsTdFiles"],
|
|
|
|
)
|
|
|
|
|
2022-11-15 07:48:51 +01:00
|
|
|
td_library(
|
|
|
|
name = "BufferizationEnumsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-11-14 18:57:52 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizationEnumsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-enum-decls"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationEnums.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-enum-defs"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationEnums.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
|
2022-11-15 07:48:51 +01:00
|
|
|
deps = [":BufferizationEnumsTdFiles"],
|
2022-11-14 18:57:52 +01:00
|
|
|
)
|
|
|
|
|
2022-06-09 13:00:08 +02:00
|
|
|
td_library(
|
|
|
|
name = "BufferizationTransformOpsTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-11-14 19:02:56 +01:00
|
|
|
":BufferizationOpsTdFiles",
|
2022-06-09 13:00:08 +02:00
|
|
|
":TransformDialectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizationTransformOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
|
|
|
|
deps = [
|
|
|
|
":BufferizationTransformOpsTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "BufferizationTransformOps",
|
|
|
|
srcs = [
|
|
|
|
"lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":BufferizationDialect",
|
2022-11-14 19:02:56 +01:00
|
|
|
":BufferizationEnumsIncGen",
|
2022-06-09 13:00:08 +02:00
|
|
|
":BufferizationTransformOpsIncGen",
|
|
|
|
":BufferizationTransforms",
|
|
|
|
":IR",
|
2023-07-14 11:57:54 +02:00
|
|
|
":LinalgDialect",
|
2022-06-09 13:00:08 +02:00
|
|
|
":MemRefDialect",
|
|
|
|
":Parser",
|
|
|
|
":SideEffectInterfaces",
|
2022-12-19 10:03:44 +01:00
|
|
|
":TensorDialect",
|
2022-06-09 13:00:08 +02:00
|
|
|
":TransformDialect",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-25 11:42:16 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizationOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
|
2022-01-25 00:51:41 +09:00
|
|
|
deps = [
|
|
|
|
":BufferizableOpInterfaceTdFiles",
|
|
|
|
":BufferizationOpsTdFiles",
|
|
|
|
],
|
2021-11-25 11:42:16 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "BufferizationDialect",
|
2022-01-20 18:14:59 +09:00
|
|
|
srcs = [
|
2022-01-25 00:51:41 +09:00
|
|
|
"lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp",
|
2022-01-20 18:14:59 +09:00
|
|
|
"lib/Dialect/Bufferization/IR/BufferizationDialect.cpp",
|
|
|
|
"lib/Dialect/Bufferization/IR/BufferizationOps.cpp",
|
|
|
|
],
|
2022-01-25 00:51:41 +09:00
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h",
|
|
|
|
"include/mlir/Dialect/Bufferization/IR/Bufferization.h",
|
2022-10-27 10:40:24 +02:00
|
|
|
"include/mlir/Dialect/Bufferization/IR/DstBufferizableOpInterfaceImpl.h",
|
2022-01-25 00:51:41 +09:00
|
|
|
],
|
2021-11-25 11:42:16 +01:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-06-13 06:50:55 +00:00
|
|
|
":AffineDialect",
|
2021-11-30 13:10:37 +01:00
|
|
|
":AllocationOpInterface",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2022-01-25 00:51:41 +09:00
|
|
|
":BufferizableOpInterfaceIncGen",
|
2021-11-25 11:42:16 +01:00
|
|
|
":BufferizationBaseIncGen",
|
2022-11-14 18:57:52 +01:00
|
|
|
":BufferizationEnumsIncGen",
|
2022-11-14 19:02:56 +01:00
|
|
|
":BufferizationOpsIncGen",
|
2022-09-02 14:32:04 +02:00
|
|
|
":ControlFlowInterfaces",
|
2022-04-25 09:16:16 +02:00
|
|
|
":CopyOpInterface",
|
2022-10-27 10:40:24 +02:00
|
|
|
":DestinationStyleOpInterface",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-11-25 11:42:16 +01:00
|
|
|
":IR",
|
2022-05-21 02:31:07 +02:00
|
|
|
":InferTypeOpInterface",
|
2021-11-30 13:10:37 +01:00
|
|
|
":MemRefDialect",
|
2022-06-23 12:17:01 -07:00
|
|
|
":SparseTensorDialect",
|
2022-01-25 00:51:41 +09:00
|
|
|
":Support",
|
2021-11-25 11:42:16 +01:00
|
|
|
":TensorDialect",
|
|
|
|
"//llvm:Support",
|
2021-11-23 10:04:47 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-29 13:45:01 +01:00
|
|
|
gentbl_cc_library(
|
|
|
|
name = "BufferizationPassIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Bufferization",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/Bufferization/Transforms/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/Bufferization/Transforms/Passes.td",
|
|
|
|
deps = [":PassBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "BufferizationTransforms",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Dialect/Bufferization/Transforms/*.cpp",
|
|
|
|
"lib/Dialect/Bufferization/Transforms/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/Bufferization/Transforms/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":AllocationOpInterface",
|
|
|
|
":Analysis",
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationDialect",
|
2022-11-15 07:48:51 +01:00
|
|
|
":BufferizationEnumsIncGen",
|
2021-11-29 13:45:01 +01:00
|
|
|
":BufferizationPassIncGen",
|
2022-01-20 18:14:59 +09:00
|
|
|
":ControlFlowInterfaces",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":IR",
|
2022-01-24 21:21:37 -08:00
|
|
|
":LoopLikeInterface",
|
2021-11-29 13:45:01 +01:00
|
|
|
":MemRefDialect",
|
2023-07-11 14:13:07 -07:00
|
|
|
":MemRefUtils",
|
2021-11-29 13:45:01 +01:00
|
|
|
":Pass",
|
2022-11-11 17:10:38 +00:00
|
|
|
":SideEffectInterfaces",
|
2022-05-21 02:31:07 +02:00
|
|
|
":TensorDialect",
|
2021-11-29 13:45:01 +01:00
|
|
|
":Transforms",
|
2022-08-30 13:15:27 +02:00
|
|
|
":ViewLikeInterface",
|
2021-11-29 13:45:01 +01:00
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-11-30 13:27:24 +01:00
|
|
|
cc_library(
|
|
|
|
name = "BufferizationToMemRef",
|
|
|
|
srcs = [
|
|
|
|
"lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/mlir/Conversion/BufferizationToMemRef/BufferizationToMemRef.h",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-09-29 11:14:47 -04:00
|
|
|
":ArithDialect",
|
2021-11-30 13:27:24 +01:00
|
|
|
":BufferizationDialect",
|
|
|
|
":ConversionPassIncGen",
|
2022-03-02 16:16:14 +01:00
|
|
|
":FuncDialect",
|
2021-11-30 13:27:24 +01:00
|
|
|
":IR",
|
|
|
|
":MemRefDialect",
|
|
|
|
":Pass",
|
2023-07-19 14:13:27 +00:00
|
|
|
":SCFDialect",
|
2021-11-30 13:27:24 +01:00
|
|
|
":Support",
|
|
|
|
":Transforms",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-05-18 15:42:25 -07:00
|
|
|
td_library(
|
|
|
|
name = "DLTIDialectTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/DLTI/DLTI.td",
|
|
|
|
"include/mlir/Dialect/DLTI/DLTIBase.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "DLTIBaseIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=dlti",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/DLTI/DLTIDialect.h.inc",
|
|
|
|
),
|
2021-06-28 22:54:11 +00:00
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=dlti",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/DLTI/DLTIDialect.cpp.inc",
|
|
|
|
),
|
2021-05-18 15:42:25 -07:00
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/DLTI/DLTIBase.td",
|
|
|
|
deps = [":OpBaseTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "DLTIDialect",
|
|
|
|
srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Dialect/DLTI/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":DLTIBaseIncGen",
|
|
|
|
":DataLayoutInterfaces",
|
|
|
|
":IR",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "ReducerIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-pass-decls",
|
|
|
|
"-name=Reducer",
|
|
|
|
],
|
|
|
|
"include/mlir/Reducer/Passes.h.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Reducer/Passes.td",
|
|
|
|
deps = [
|
|
|
|
":PassBaseTdFiles",
|
|
|
|
":ReducerTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "Reducer",
|
|
|
|
srcs = glob(["lib/Reducer/*.cpp"]),
|
|
|
|
hdrs = glob(["include/mlir/Reducer/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Pass",
|
|
|
|
":ReducerIncGen",
|
|
|
|
":Rewrite",
|
|
|
|
":Support",
|
|
|
|
":TransformUtils",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "MlirReduceLib",
|
|
|
|
srcs = ["lib/Tools/mlir-reduce/MlirReduceMain.cpp"],
|
2022-10-03 14:34:14 -07:00
|
|
|
hdrs = [
|
2022-10-27 16:45:14 -04:00
|
|
|
"include/mlir/Tools/ParseUtilities.h",
|
2022-10-07 13:49:28 +02:00
|
|
|
"include/mlir/Tools/mlir-reduce/MlirReduceMain.h",
|
2022-10-03 14:34:14 -07:00
|
|
|
],
|
2021-05-18 15:42:25 -07:00
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":Parser",
|
|
|
|
":Pass",
|
|
|
|
":Reducer",
|
|
|
|
":Rewrite",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-reduce",
|
|
|
|
srcs = ["tools/mlir-reduce/mlir-reduce.cpp"],
|
|
|
|
includes = ["include"],
|
|
|
|
local_defines = ["MLIR_INCLUDE_TESTS"],
|
|
|
|
stamp = 0,
|
|
|
|
deps = [
|
|
|
|
":AllPassesAndDialects",
|
|
|
|
":IR",
|
|
|
|
":MlirReduceLib",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//mlir/test:TestDialect",
|
|
|
|
],
|
|
|
|
)
|
2021-12-16 01:48:19 +00:00
|
|
|
|
2022-03-04 01:02:18 +00:00
|
|
|
cc_library(
|
|
|
|
name = "PDLLODS",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/PDLL/ODS/*.cpp",
|
|
|
|
"lib/Tools/PDLL/ODS/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Tools/PDLL/ODS/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2022-03-04 01:02:18 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-12-16 01:48:19 +00:00
|
|
|
cc_library(
|
|
|
|
name = "PDLLAST",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/PDLL/AST/*.cpp",
|
|
|
|
"lib/Tools/PDLL/AST/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Tools/PDLL/AST/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-01-25 12:33:42 +01:00
|
|
|
":Support",
|
2021-12-16 01:48:19 +00:00
|
|
|
"//llvm:Support",
|
2022-12-20 20:09:00 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-12-16 01:48:19 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-27 00:11:42 +01:00
|
|
|
cc_library(
|
|
|
|
name = "PDLLCodeGen",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/PDLL/CodeGen/*.cpp",
|
|
|
|
"lib/Tools/PDLL/CodeGen/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Tools/PDLL/CodeGen/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
2022-07-25 20:26:19 -07:00
|
|
|
":AsmParser",
|
2022-02-27 00:11:42 +01:00
|
|
|
":IR",
|
|
|
|
":PDLDialect",
|
|
|
|
":PDLLAST",
|
2022-03-04 04:15:38 +00:00
|
|
|
":PDLLODS",
|
2022-02-27 00:11:42 +01:00
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-12-16 01:48:19 +00:00
|
|
|
cc_library(
|
|
|
|
name = "PDLLParser",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"lib/Tools/PDLL/Parser/*.cpp",
|
|
|
|
"lib/Tools/PDLL/Parser/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(["include/mlir/Tools/PDLL/Parser/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":PDLLAST",
|
2022-03-04 01:02:18 +00:00
|
|
|
":PDLLODS",
|
2021-12-16 01:48:19 +00:00
|
|
|
":Support",
|
|
|
|
":TableGen",
|
|
|
|
"//llvm:Support",
|
2022-03-04 01:02:18 +00:00
|
|
|
"//llvm:TableGen",
|
2023-01-06 12:51:01 +01:00
|
|
|
"//llvm:TargetParser",
|
2021-12-16 01:48:19 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-pdll",
|
|
|
|
srcs = [
|
|
|
|
"tools/mlir-pdll/mlir-pdll.cpp",
|
|
|
|
],
|
|
|
|
deps = [
|
2022-02-27 00:11:42 +01:00
|
|
|
":IR",
|
2021-12-16 01:48:19 +00:00
|
|
|
":PDLLAST",
|
2022-02-27 00:11:42 +01:00
|
|
|
":PDLLCodeGen",
|
2022-03-08 08:55:55 +01:00
|
|
|
":PDLLODS",
|
2021-12-16 01:48:19 +00:00
|
|
|
":PDLLParser",
|
|
|
|
":Support",
|
|
|
|
"//llvm:Support",
|
|
|
|
"//llvm:config",
|
|
|
|
],
|
|
|
|
)
|
2022-03-19 17:53:37 -07:00
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "mlir-pdll-lsp-server",
|
|
|
|
srcs = ["tools/mlir-pdll-lsp-server/mlir-pdll-lsp-server.cpp"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":MlirPdllLspServerLib",
|
|
|
|
":Support",
|
|
|
|
],
|
|
|
|
)
|
2022-11-08 12:14:32 +01:00
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "DialectConversionPdllFiles",
|
|
|
|
srcs = ["include/mlir/Transforms/DialectConversion.pdll"],
|
|
|
|
includes = ["include"],
|
|
|
|
)
|
2023-07-20 15:08:19 +02:00
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "UBDialectTdFiles",
|
|
|
|
srcs = [
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOps.td",
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
|
|
|
|
],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":OpBaseTdFiles",
|
|
|
|
":SideEffectInterfacesTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "UBOpsInterfacesIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["--gen-attr-interface-decls"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsInterfaces.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attr-interface-defs"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsInterfaces.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
|
|
|
|
deps = [":UBDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "UBOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-decls",
|
|
|
|
"-dialect=ub",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
[
|
|
|
|
"-gen-dialect-defs",
|
|
|
|
"-dialect=ub",
|
|
|
|
],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-decls"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsAttributes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["--gen-attrdef-defs"],
|
|
|
|
"include/mlir/Dialect/UB/IR/UBOpsAttributes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = ":mlir-tblgen",
|
|
|
|
td_file = "include/mlir/Dialect/UB/IR/UBOps.td",
|
|
|
|
deps = [":UBDialectTdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "UBDialect",
|
|
|
|
srcs = ["lib/Dialect/UB/IR/UBOps.cpp"],
|
|
|
|
hdrs = ["include/mlir/Dialect/UB/IR/UBOps.h"],
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IR",
|
|
|
|
":SideEffectInterfaces",
|
|
|
|
":UBOpsIncGen",
|
|
|
|
":UBOpsInterfacesIncGen",
|
2023-07-20 17:05:28 +02:00
|
|
|
"//llvm:Support",
|
2023-07-20 15:08:19 +02:00
|
|
|
],
|
|
|
|
)
|
2023-07-24 19:21:18 +02:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "UBToLLVM",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/UBToLLVM/*.cpp",
|
|
|
|
"lib/Conversion/UBToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/UBToLLVM/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":IR",
|
|
|
|
":LLVMCommonConversion",
|
|
|
|
":LLVMDialect",
|
|
|
|
":Pass",
|
|
|
|
":UBDialect",
|
|
|
|
],
|
|
|
|
)
|
2023-07-24 19:33:33 -07:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "UBToSPIRV",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Conversion/UBToSPIRV/*.cpp",
|
|
|
|
"lib/Conversion/UBToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"include/mlir/Conversion/UBToSPIRV/*.h",
|
|
|
|
]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":ConversionPassIncGen",
|
|
|
|
":Pass",
|
|
|
|
":SPIRVConversion",
|
|
|
|
":SPIRVDialect",
|
|
|
|
":UBDialect",
|
|
|
|
"//llvm:Core",
|
|
|
|
],
|
|
|
|
)
|