Skip to content

Commit

Permalink
Integrate StableHLO at openxla/stablehlo@f7f8e4e3
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681168444
  • Loading branch information
abhigunj authored and Google-ML-Automation committed Oct 2, 2024
1 parent cd6e808 commit 88346a4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 908 deletions.
901 changes: 0 additions & 901 deletions third_party/stablehlo/temporary.patch

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions third_party/stablehlo/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")

def repo():
# LINT.IfChange
STABLEHLO_COMMIT = "9d9290dc2308c1850cea69ea05f8c94017e484ee"
STABLEHLO_SHA256 = "29803fc8a3a96f9e5469c7ab51f2ff4292dc2419c17bd0466f5d15a448cf6815"
STABLEHLO_COMMIT = "f7f8e4e35296deeff2e12e39421ac8d9599ba340"
STABLEHLO_SHA256 = "c92b55d5512e58d6fefba62c58e60d7762adb184dc3ad489521de562f6ca7aeb"
# LINT.ThenChange(Google-internal path)

tf_http_archive(
Expand Down
2 changes: 1 addition & 1 deletion xla/mlir_hlo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ cc_library(
srcs = [
"stablehlo_ext/transforms/chlo_recompose_ops.cpp",
"stablehlo_ext/transforms/stablehlo_canonicalize_dynamism.cpp",
"stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp",
"stablehlo_ext/transforms/stablehlo_compatibility_expander.cpp",
"stablehlo_ext/transforms/stablehlo_refine_shapes.cpp",
],
hdrs = [
Expand Down
2 changes: 1 addition & 1 deletion xla/mlir_hlo/stablehlo_ext/transforms/passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void createChloLegalizeToStablehloPipeline(OpPassManager &pm);
// Expand backward compatibility with the given StableHLO version by decomposing
// newer StableHLO operations into equivalent operations supported by that older
// version.
std::unique_ptr<Pass> createStablehloCreateCompatibilityExpanderPass(
std::unique_ptr<Pass> createStablehloCompatibilityExpanderPass(
std::string targetVersionOption);

} // namespace stablehlo_ext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ namespace stablehlo_ext {

// TODO(b/369406385): remove this method (and file) once issue is resolved.

std::unique_ptr<::mlir::Pass> createStablehloCreateCompatibilityExpanderPass(
std::unique_ptr<::mlir::Pass> createStablehloCompatibilityExpanderPass(
std::string targetVersionOption) {
return mlir::stablehlo::createStablehloCreateCompatibilityExpanderPass(
return mlir::stablehlo::createStablehloCompatibilityExpanderPass(
{std::move(targetVersionOption)});
}

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/mlir_to_hlo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ absl::StatusOr<std::string> SerializeUsingVersionedStablehlo(
pm.addNestedPass<mlir::func::FuncOp>(
mlir::stablehlo::createChloLegalizeToStablehloPass());
pm.addNestedPass<mlir::func::FuncOp>(
mlir::stablehlo::createStablehloCreateCompatibilityExpanderPass(
mlir::stablehlo::createStablehloCompatibilityExpanderPass(
{std::string(target)}));
pm.addNestedPass<mlir::func::FuncOp>(
mlir::stablehlo::createChloLegalizeToStablehloPass());
Expand Down

0 comments on commit 88346a4

Please sign in to comment.