Skip to content

Commit

Permalink
Integrate StableHLO at openxla/stablehlo@e3276cd
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 584719081
  • Loading branch information
sdasgup3 authored and TensorFlow MLIR Team committed Nov 22, 2023
1 parent f8cec34 commit 4bc2661
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions stablehlo/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ http_archive(
],
)

LLVM_COMMIT = "506c47df00bbd9e527ecc5ac6e192b5fe5daa2c5"
LLVM_COMMIT = "2b0b0ad7e760e30b66cebfc994d0eb64de8846ad"

LLVM_SHA256 = "5db67a5293810e6aebd2f757d660dbe2271fc86016c56cfcc56a89705dc22d80"
LLVM_SHA256 = "6257e7d8f95a42c248304a1f7ecf7a00ba9504cf6d8e901750781e22589580fe"

http_archive(
name = "llvm-raw",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,12 +910,13 @@ struct CompareSelectOpToStdScalarOp<SupportedType, StdCompareOp, Predicate,
template <>
inline Value mapStablehloOpToStdScalarOp<stablehlo::ClampOp>(
Location loc, ArrayRef<Type> resultTypes, ArrayRef<Type> argTypes,
stablehlo::ClampOp::Adaptor op, OpBuilder *b) {
stablehlo::ClampOp::Adaptor adaptor, OpBuilder *b) {
// clamp(lb, x, ub) = min(max(lb, x), ub)
Value maxLbX = mapStablehloOpToStdScalarOp<stablehlo::MaxOp>(
loc, resultTypes, argTypes, ValueRange{op.getMin(), op.getOperand()}, b);
loc, resultTypes, argTypes,
ValueRange{adaptor.getMin(), adaptor.getOperand()}, b);
return mapStablehloOpToStdScalarOp<stablehlo::MinOp>(
loc, resultTypes, argTypes, ValueRange{maxLbX, op.getMax()}, b);
loc, resultTypes, argTypes, ValueRange{maxLbX, adaptor.getMax()}, b);
}

template <typename U, typename S>
Expand Down
2 changes: 1 addition & 1 deletion stablehlo/stablehlo/dialect/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Version {
static FailureOr<Version> fromString(llvm::StringRef versionRef);

/// Return a Version representing the current VHLO dialect version.
static Version getCurrentVersion() { return Version(0, 15, 3); }
static Version getCurrentVersion() { return Version(0, 15, 4); }

/// Return a Version representing the minimum supported VHLO dialect version.
static Version getMinimumVersion() { return Version(0, 9, 0); }
Expand Down

0 comments on commit 4bc2661

Please sign in to comment.