Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pulling in the additional StableHLO internal changes via
[temporary.patch](https://raw.githubusercontent.com/openxla/xla/refs/heads/main/third_party/stablehlo/temporary.patch)
  • Loading branch information
sdasgup3 authored Dec 18, 2024
1 parent 9e0c9e3 commit 1ff299e
Show file tree
Hide file tree
Showing 5 changed files with 675 additions and 0 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ cc_library(
":chlo_attrs_inc_gen",
":chlo_enums_inc_gen",
":chlo_ops_inc_gen",
":stablehlo_assembly_format",
":stablehlo_type_inference",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:BytecodeOpInterface",
Expand Down
25 changes: 25 additions & 0 deletions stablehlo/dialect/ChloEnums.td
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,29 @@ def CHLO_ComparisonType : I32EnumAttr<"ComparisonType",

def CHLO_ComparisonTypeAttr : EnumAttr<CHLO_Dialect, CHLO_ComparisonType, "comparison_type">;

//===----------------------------------------------------------------------===//
// Ragged dot op definitions.
//===----------------------------------------------------------------------===//

// These mirror the XLA PrecisionConfig proto enum.
def CHLO_PRECISION_DEFAULT : I32EnumAttrCase<"DEFAULT", 0>;
def CHLO_PRECISION_HIGH : I32EnumAttrCase<"HIGH", 1>;
def CHLO_PRECISION_HIGHEST : I32EnumAttrCase<"HIGHEST", 2>;

def CHLO_Precision : I32EnumAttr<"Precision",
"XLA precision for an operand. Has backend specific meaning.",
[
CHLO_PRECISION_DEFAULT,
CHLO_PRECISION_HIGH,
CHLO_PRECISION_HIGHEST
]> {
let genSpecializedAttr = 0;
let cppNamespace = "::mlir::chlo";
}

def CHLO_PrecisionAttr : EnumAttr<CHLO_Dialect, CHLO_Precision, "precision">;

def CHLO_PrecisionConfigAttr:
TypedArrayAttrBase<CHLO_PrecisionAttr, "Precision Config attribute">;

#endif // STABLEHLO_DIALECT_CHLO_ENUMS
Loading

0 comments on commit 1ff299e

Please sign in to comment.