| # Copyright 2026 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_gentbl_cc_library", "iree_td_library") |
| |
| package( |
| default_visibility = ["//visibility:public"], |
| features = ["layering_check"], |
| licenses = ["notice"], |
| ) |
| |
| iree_td_library( |
| name = "PassesTdFiles", |
| srcs = ["Passes.td"], |
| deps = [ |
| "@llvm-project//mlir:PassBaseTdFiles", |
| ], |
| ) |
| |
| iree_gentbl_cc_library( |
| name = "PassesIncGen", |
| tbl_outs = [ |
| ( |
| ["--gen-pass-decls"], |
| "Passes.h.inc", |
| ), |
| ], |
| tblgen = "@llvm-project//mlir:mlir-tblgen", |
| td_file = "Passes.td", |
| deps = [":PassesTdFiles"], |
| ) |
| |
| iree_compiler_cc_library( |
| name = "PassHeaders", |
| hdrs = [ |
| "Passes.h", |
| "Passes.h.inc", |
| ], |
| deps = [ |
| ":PassesIncGen", |
| "@llvm-project//mlir:Pass", |
| "@llvm-project//mlir:Transforms", |
| ], |
| ) |
| |
| iree_compiler_cc_library( |
| name = "InputConversion", |
| srcs = [ |
| "BindSymbolicShapes.cpp", |
| "BitCastTensor.cpp", |
| "ConvertTMTensorToLinalgExt.cpp", |
| "ConvertTorchUnstructuredToLinalgExt.cpp", |
| "FuncConversion.cpp", |
| "Passes.cpp", |
| "SetStrictSymbolicShapes.cpp", |
| ], |
| hdrs = ["Passes.h"], |
| deps = [ |
| ":PassHeaders", |
| ":PassesIncGen", |
| "//compiler/src/iree/compiler/Dialect/Flow/IR", |
| "//compiler/src/iree/compiler/Dialect/HAL/IR", |
| "//compiler/src/iree/compiler/Dialect/LinalgExt/IR", |
| "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms", |
| "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils", |
| "//compiler/src/iree/compiler/Dialect/TensorExt/IR", |
| "//compiler/src/iree/compiler/Dialect/Util/IR", |
| "@llvm-project//llvm:Support", |
| "@llvm-project//mlir:ArithDialect", |
| "@llvm-project//mlir:ArithUtils", |
| "@llvm-project//mlir:FuncDialect", |
| "@llvm-project//mlir:FuncTransforms", |
| "@llvm-project//mlir:FunctionInterfaces", |
| "@llvm-project//mlir:IR", |
| "@llvm-project//mlir:LinalgDialect", |
| "@llvm-project//mlir:MathDialect", |
| "@llvm-project//mlir:MemRefDialect", |
| "@llvm-project//mlir:MemRefTransforms", |
| "@llvm-project//mlir:Pass", |
| "@llvm-project//mlir:SCFDialect", |
| "@llvm-project//mlir:Support", |
| "@llvm-project//mlir:TensorDialect", |
| "@llvm-project//mlir:TransformUtils", |
| "@llvm-project//mlir:Transforms", |
| "@torch-mlir//:TorchMLIRConversionPasses", |
| "@torch-mlir//:TorchMLIRTMTensorDialect", |
| "@torch-mlir//:TorchMLIRTorchConversionDialect", |
| "@torch-mlir//:TorchMLIRTorchConversionPasses", |
| "@torch-mlir//:TorchMLIRTorchConversionToMLProgram", |
| "@torch-mlir//:TorchMLIRTorchDialect", |
| "@torch-mlir//:TorchMLIRTorchDialectUtils", |
| "@torch-mlir//:TorchMLIRTorchOnnxToTorch", |
| "@torch-mlir//:TorchMLIRTorchPasses", |
| "@torch-mlir//:TorchMLIRTorchToArith", |
| "@torch-mlir//:TorchMLIRTorchToLinalg", |
| "@torch-mlir//:TorchMLIRTorchToSCF", |
| "@torch-mlir//:TorchMLIRTorchToTMTensor", |
| "@torch-mlir//:TorchMLIRTorchToTensor", |
| ], |
| ) |