From 72eec790ea2707fd74889b56277924a72c60374c Mon Sep 17 00:00:00 2001 From: Tom Natan Date: Sat, 14 Sep 2024 02:45:20 -0700 Subject: [PATCH] Use `xla::GetDefaultStablehloVersion` with ~12w compatibility requirement in third_party/tensorflow/compiler/xla/python/ifrt/hlo/hlo_program_serdes.cc PiperOrigin-RevId: 674606265 --- xla/python/ifrt/hlo/BUILD | 1 - xla/python/ifrt/hlo/hlo_program_serdes.cc | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xla/python/ifrt/hlo/BUILD b/xla/python/ifrt/hlo/BUILD index 7b6692abd4bf4..c946f93008486 100644 --- a/xla/python/ifrt/hlo/BUILD +++ b/xla/python/ifrt/hlo/BUILD @@ -39,7 +39,6 @@ cc_library( "@llvm-project//mlir:IR", "@llvm-project//mlir:Pass", "@llvm-project//mlir:Support", - "@stablehlo//:stablehlo_portable_api", "@stablehlo//:stablehlo_serialization", "@tsl//tsl/platform:statusor", ], diff --git a/xla/python/ifrt/hlo/hlo_program_serdes.cc b/xla/python/ifrt/hlo/hlo_program_serdes.cc index 3265fb7818a43..bc73cc884f4ee 100644 --- a/xla/python/ifrt/hlo/hlo_program_serdes.cc +++ b/xla/python/ifrt/hlo/hlo_program_serdes.cc @@ -27,7 +27,6 @@ limitations under the License. #include "mlir/IR/OwningOpRef.h" #include "mlir/Pass/PassManager.h" #include "mlir/Support/LogicalResult.h" -#include "stablehlo/api/PortableApi.h" #include "stablehlo/dialect/Serialization.h" #include "xla/mlir/utils/error_util.h" #include "xla/mlir_hlo/mhlo/transforms/passes.h" @@ -80,7 +79,7 @@ class HloProgramSerDes : public llvm::RTTIExtends { // Serialize portable artifact. TF_ASSIGN_OR_RETURN(std::string serialized, xla::SerializeUsingVersionedStablehlo( - *module, mlir::stablehlo::getMinimumVersion())); + *module, xla::GetDefaultStablehloVersion())); return serialized; }