[Mlir-commits] [mlir] Quantile Type and Low FP Support (PR #190321)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Apr 8 02:52:39 PDT 2026
================
@@ -1109,6 +1109,94 @@ def Builtin_Opaque : Builtin_Type<"Opaque", "opaque"> {
let genVerifyDecl = 1;
}
+//===----------------------------------------------------------------------===//
+// QuantileType
+//===----------------------------------------------------------------------===//
+
+def Builtin_Quantile : Builtin_Type<"Quantile", "quantile",
+ [QuantStorageTypeInterface, MemRefElementTypeInterface]> {
+ let summary = "Quantile-based type with a lookup table of quantile values";
+ let description = [{
+ Syntax:
+
+ ```
+ quantile-type ::= `quantile` `<` type ( `<` int `,` int `>` )? `:` type `,` `{` float-list `}` `>`
+ ```
+
+ A quantile type represents a quantile-based floating point encoding, where
+ discrete storage values map to floating-point values via a quantile lookup
+ table. The type has a storage type (how raw values are stored, e.g., `ui4`,
+ `si8`), a quantile type (the expressed floating-point precision, e.g.,
+ `f16`, `f32`), and an array of quantile values that define the mapping.
+
+ Optionally, explicit minimum and maximum storage values can be specified
+ after the storage type as `<min,max>`, overriding the defaults derived from
+ the storage type width.
+
+ This type is used for weight compression schemes like NF4 (NormalFloat4)
----------------
Roman-Pevnyi wrote:
[Normalized float4](https://github.com/openvinotoolkit/npu_compiler/blob/90b6098b9ee96055d633dc520354434bae22e336/src/vpux_compiler/include/vpux/compiler/core/types/quantile_float/types.hpp#L62)
https://github.com/llvm/llvm-project/pull/190321
More information about the Mlir-commits
mailing list