Skip to content

Commit

Permalink
[mhlo] Drop unnecessary build dependencies (#12728)
Browse files Browse the repository at this point in the history
Also update the bazel-cmake target mapping to avoid pulling in unused
cmake targets.

Issue: #12678
  • Loading branch information
kuhar committed Mar 23, 2023
1 parent d9b052d commit 5eb892a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
11 changes: 3 additions & 8 deletions build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@
"ChloOps",
"MhloDialect",
],
"@mlir-hlo//:map_lmhlo_to_scalar_op": [
"tensorflow::external_mhlo_includes",
"LmhloDialect", # Unfortunate.
"MhloDialect",
],
"@mlir-hlo//:map_mhlo_to_scalar_op": [
"tensorflow::external_mhlo_includes",
"MhloDialect",
Expand All @@ -97,12 +92,12 @@
"tensorflow::external_mhlo_includes",
"MhloPasses",
"MhloShapeOpsToStandard",
"MhloToArithmeticConversion",
"MhloToLhloConversion",
"MhloToLinalg",
"MhloToMemrefConversion",
"MhloToStandard",
"StablehloToMhlo",
# Note: We deliberately omit some passes that we do not use in IREE,
# e.g.: MhloToArithmeticConversion, MhloToLhloConversion, or
# MhloToMemrefConversion.
],
"@mlir-hlo//:unfuse_batch_norm": [
"tensorflow::external_mhlo_includes",
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/iree/compiler/InputConversion/MHLO/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ iree_compiler_cc_library(
"@llvm-project//mlir:Transforms",
"@mlir-hlo//:chlo_legalize_to_hlo",
"@mlir-hlo//:map_chlo_to_hlo_op",
"@mlir-hlo//:map_lmhlo_to_scalar_op",
"@mlir-hlo//:map_mhlo_to_scalar_op",
"@mlir-hlo//:mhlo_passes",
"@mlir-hlo//:mlir_hlo",
"@mlir-hlo//:unfuse_batch_norm",
"@mlir-hlo//stablehlo:broadcast_utils",
"@mlir-hlo//stablehlo:chlo_ops",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ iree_cc_library(
IREELinalgExtDialect
IREELinalgExtPasses
LLVMSupport
LmhloDialect
MLIRAffineDialect
MLIRAffineUtils
MLIRArithDialect
Expand Down Expand Up @@ -87,10 +86,7 @@ iree_cc_library(
MhloDialect
MhloPasses
MhloShapeOpsToStandard
MhloToArithmeticConversion
MhloToLhloConversion
MhloToLinalg
MhloToMemrefConversion
MhloToStandard
StablehloBroadcastUtils
StablehloToMhlo
Expand Down
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/Tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ iree_compiler_cc_library(
"@llvm-project//mlir:ConversionPasses",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:TosaDialect",
"@mlir-hlo//:lhlo",
"@mlir-hlo//:mlir_hlo",
"@mlir-hlo//stablehlo:chlo_ops",
"@mlir-hlo//stablehlo:stablehlo_ops",
Expand Down

0 comments on commit 5eb892a

Please sign in to comment.