Skip to content

Commit

Permalink
Integrate CHLO->StableHLO lowerings in XLA
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 617886759
  • Loading branch information
GleasonK authored and TensorFlow MLIR Team committed Mar 21, 2024
1 parent 95aca46 commit 0655e1d
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 3,143 deletions.
26 changes: 2 additions & 24 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ cc_library(
],
strip_include_prefix = ".",
deps = [
":chlo_legalize_to_hlo",
":chlo_legalize_to_hlo_inc_gen",
":hlo_legalize_to_stablehlo",
":legalize_to_linalg_utils",
":legalize_to_standard_inc_gen",
Expand All @@ -574,6 +574,7 @@ cc_library(
"//stablehlo:base",
"//stablehlo:chlo_ops",
"//stablehlo:stablehlo_ops",
"//stablehlo:stablehlo_passes",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:AffineDialect",
"@llvm-project//mlir:ArithDialect",
Expand Down Expand Up @@ -860,28 +861,6 @@ cc_library(
],
)

cc_library(
name = "chlo_legalize_to_hlo",
srcs = ["mhlo/transforms/chlo_legalize_to_hlo/chlo_legalize_to_hlo.cc"],
hdrs = ["mhlo/transforms/rewriters.h"],
strip_include_prefix = ".",
deps = [
":chlo_legalize_to_hlo_inc_gen",
":map_chlo_to_hlo_op",
":mlir_hlo",
"//stablehlo:broadcast_utils",
"//stablehlo:chlo_ops",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:ComplexDialect",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:SCFDialect",
"@llvm-project//mlir:ShapeDialect",
"@llvm-project//mlir:TensorDialect",
"@llvm-project//mlir:Transforms",
],
)

gentbl_cc_library(
name = "chlo_legalize_to_hlo_inc_gen",
strip_include_prefix = "mhlo/transforms",
Expand Down Expand Up @@ -950,7 +929,6 @@ cc_library(
],
strip_include_prefix = ".",
deps = [
":chlo_legalize_to_hlo",
":deallocation_passes",
":deallocation_passes_inc_gen",
":lhlo",
Expand Down
1 change: 0 additions & 1 deletion mhlo/transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ add_mlir_library(MhloToStandard
)

add_mlir_library(ChloPasses
chlo_legalize_to_hlo/chlo_legalize_to_hlo.cc
chlo_legalize_to_hlo/chlo_legalize_to_hlo_pass.cc

DEPENDS
Expand Down
Loading

0 comments on commit 0655e1d

Please sign in to comment.