From 05f004e8368c955b872126b1c978c60e33bbc5c8 Mon Sep 17 00:00:00 2001 From: Abhinav Gunjal Date: Tue, 3 Dec 2024 14:57:23 -0800 Subject: [PATCH] Integrate StableHLO at openxla/stablehlo@d1db6dfe PiperOrigin-RevId: 702479909 --- third_party/stablehlo/temporary.patch | 49 --------------------------- third_party/stablehlo/workspace.bzl | 4 +-- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/third_party/stablehlo/temporary.patch b/third_party/stablehlo/temporary.patch index 09b5ad449e164..8b137891791fe 100755 --- a/third_party/stablehlo/temporary.patch +++ b/third_party/stablehlo/temporary.patch @@ -1,50 +1 @@ -diff --ruN a/stablehlo/docs/interpreter_status.md b/stablehlo/docs/interpreter_status.md ---- stablehlo/docs/interpreter_status.md -+++ stablehlo/docs/interpreter_status.md -@@ -237,15 +237,6 @@ - ### Convert Not In HLO Ops - - ```sh --# broadcast --mlir-hlo-opt -mhlo-legalize-broadcast-to-broadcast-in-dim -- --# create_token --mlir-hlo-opt -mhlo-legalize-create-token-to-after-all -- --# cross-replica-sum --mlir-hlo-opt -mhlo-legalize-cross-replica-sum-to-all-reduce -- - # dot - mlir-hlo-opt -mhlo-legalize-dot-to-dot-general - -diff --ruN a/stablehlo/stablehlo/tests/transforms/stablehlo_convert_to_signless.mlir b/stablehlo/stablehlo/tests/transforms/stablehlo_convert_to_signless.mlir ---- stablehlo/stablehlo/tests/transforms/stablehlo_convert_to_signless.mlir -+++ stablehlo/stablehlo/tests/transforms/stablehlo_convert_to_signless.mlir -@@ -7,9 +7,9 @@ - %1 = builtin.unrealized_conversion_cast %arg0 : memref<*xui16> to memref<*xi16> - %2 = memref.cast %1 : memref<*xi16> to memref - %3 = builtin.unrealized_conversion_cast %2 : memref to memref -- %4 = bufferization.to_tensor %3 : memref -+ %4 = bufferization.to_tensor %3 : memref to tensor - %5 = builtin.unrealized_conversion_cast %4 : tensor to tensor -- %6 = bufferization.to_memref %5 : memref -+ %6 = bufferization.to_memref %5 : tensor to memref - %7 = builtin.unrealized_conversion_cast %6 : memref to memref - func.return %7 : memref - } -diff --ruN a/stablehlo/stablehlo/transforms/StablehloAggressiveFolder.cpp b/stablehlo/stablehlo/transforms/StablehloAggressiveFolder.cpp ---- stablehlo/stablehlo/transforms/StablehloAggressiveFolder.cpp -+++ stablehlo/stablehlo/transforms/StablehloAggressiveFolder.cpp -@@ -79,8 +79,9 @@ - } else { - llvm::report_fatal_error("expected integer type"); - } -- return APSInt({/*numBits=*/numBits, value}, -- /*isUnsigned=*/isUnsigned); -+ return APSInt( -+ {/*numBits=*/numBits, value, /*isSigned=*/false, /*implicitTrunc=*/true}, -+ /*isUnsigned=*/isUnsigned); - } - - LogicalResult validateResultTypeForEval(PatternRewriter& rewriter, diff --git a/third_party/stablehlo/workspace.bzl b/third_party/stablehlo/workspace.bzl index 2b572cb36959e..a8bae733fb557 100644 --- a/third_party/stablehlo/workspace.bzl +++ b/third_party/stablehlo/workspace.bzl @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): # LINT.IfChange - STABLEHLO_COMMIT = "f21104d05371210da8e849901f75e07d3c1ff0d2" - STABLEHLO_SHA256 = "2cf6a75a156beaedd9155a909029de597966897a76a9fc791c849b48330f7466" + STABLEHLO_COMMIT = "d1db6dfe13488b4735a6f08c324145625447fb6d" + STABLEHLO_SHA256 = "c20d305f0c1a9898dec1486ceac40224b6461cb1cc3540891e6425a6627ba40f" # LINT.ThenChange(Google-internal path) tf_http_archive(