@@ -72,45 +72,45 @@ def IsValidQuantizedDimension : CPred<"mlir::hlo::isValidQuantizedDimension($_se
7272
7373// TODO(b/230381284): Upstream width-specific uniform quantized element types.
7474class StableHLO_UniformQuantizedSignedInt<int width>
75- : Type<And<[CPred<"isa<mlir::quant::UniformQuantizedType>($_self)">,
76- CPred<"cast<mlir::quant::UniformQuantizedType>($_self)" #
75+ : Type<And<[CPred<"::llvm:: isa<:: mlir::quant::UniformQuantizedType>($_self)">,
76+ CPred<"::llvm:: cast<:: mlir::quant::UniformQuantizedType>($_self)" #
7777 ".getStorageTypeIntegralWidth() == " # width>,
78- CPred<"cast<mlir::IntegerType>(" #
79- "cast<mlir::quant::UniformQuantizedType>($_self).getStorageType()" #
78+ CPred<"::llvm:: cast<:: mlir::IntegerType>(" #
79+ "::llvm:: cast<:: mlir::quant::UniformQuantizedType>($_self).getStorageType()" #
8080 ").isSignless()">, IsValidStablehloQuantizedElementType]>,
8181 "QI" # width # " type"> {
8282 string name = "UniformQuantizedSignedInt";
8383 int bitwidth = width;
8484}
8585
8686class StableHLO_UniformQuantizedPerAxisSignedInt<int width>
87- : Type<And<[CPred<"isa<mlir::quant::UniformQuantizedPerAxisType>($_self)">,
88- CPred<"cast<mlir::quant::UniformQuantizedPerAxisType>($_self)" #
87+ : Type<And<[CPred<"::llvm:: isa<:: mlir::quant::UniformQuantizedPerAxisType>($_self)">,
88+ CPred<"::llvm:: cast<:: mlir::quant::UniformQuantizedPerAxisType>($_self)" #
8989 ".getStorageTypeIntegralWidth() == " # width>,
90- CPred<"cast<mlir::IntegerType>(" #
91- "cast<mlir::quant::UniformQuantizedPerAxisType>($_self).getStorageType()" #
90+ CPred<"::llvm:: cast<:: mlir::IntegerType>(" #
91+ "::llvm:: cast<:: mlir::quant::UniformQuantizedPerAxisType>($_self).getStorageType()" #
9292 ").isSignless()">, IsValidStablehloQuantizedElementType]>,
9393 "QI" # width # " type"> {
9494 string name = "UniformQuantizedPerAxisSignedInt";
9595 int bitwidth = width;
9696}
9797
9898class StableHLO_UniformQuantizedUnsignedInt<int width>
99- : Type<And<[CPred<"isa<mlir::quant::UniformQuantizedType>($_self)">,
100- CPred<"cast<mlir::quant::UniformQuantizedType>($_self)" #
99+ : Type<And<[CPred<"::llvm:: isa<:: mlir::quant::UniformQuantizedType>($_self)">,
100+ CPred<"::llvm:: cast<:: mlir::quant::UniformQuantizedType>($_self)" #
101101 ".getStorageTypeIntegralWidth() == " # width>,
102- CPred<"!cast<mlir::quant::UniformQuantizedType>($_self)" #
102+ CPred<"!::llvm:: cast<:: mlir::quant::UniformQuantizedType>($_self)" #
103103 ".isSigned()">, IsValidStablehloQuantizedElementType]>,
104104 "QUI" # width # " type"> {
105105 string name = "UniformQuantizedUnsignedInt";
106106 int bitwidth = width;
107107}
108108
109109class StableHLO_UniformQuantizedPerAxisUnsignedInt<int width>
110- : Type<And<[CPred<"isa<mlir::quant::UniformQuantizedPerAxisType>($_self)">,
111- CPred<"cast<mlir::quant::UniformQuantizedPerAxisType>($_self)" #
110+ : Type<And<[CPred<"::llvm:: isa<:: mlir::quant::UniformQuantizedPerAxisType>($_self)">,
111+ CPred<"::llvm:: cast<:: mlir::quant::UniformQuantizedPerAxisType>($_self)" #
112112 ".getStorageTypeIntegralWidth() == " # width>,
113- CPred<"!cast<mlir::quant::UniformQuantizedPerAxisType>($_self)" #
113+ CPred<"!::llvm:: cast<:: mlir::quant::UniformQuantizedPerAxisType>($_self)" #
114114 ".isSigned()">, IsValidStablehloQuantizedElementType]>,
115115 "QUI" # width # " type"> {
116116 string name = "UniformQuantizedPerAxisUnsignedInt";
@@ -152,7 +152,7 @@ def HLO_PerAxisQuantizedInt :
152152 AnyTypeOf<[HLO_PerAxisQuantizedSignedInt, HLO_PerAxisQuantizedUnsignedInt], "per-axis integer quantized">;
153153
154154// Token type.
155- def HLO_Token : Type<CPred<"isa<TokenType>($_self)">, "token">;
155+ def HLO_Token : Type<CPred<"::llvm:: isa<::mlir::stablehlo:: TokenType>($_self)">, "token">;
156156
157157// Any integer tensor types
158158def HLO_IntTensor : RankedTensorOf<[HLO_Int]>;
0 commit comments