mirror-llvm-project/mlir/test/Dialect/Quant
vsimion26 61d6e494e9
QuantileType relax quantileType conditions and inheritance issue (#204793)
# Recategorize QuantileType as Storage Format, Not Quantization Scheme

## Summary

Reclassify `QuantileType` from inheriting `QuantizedType` to functioning
as a pure storage type.

## Motivation

### QuantileType is a Storage Format, Not a Quantization Scheme

After careful consideration, there was a conclusion reached that
**QuantileType should not be registered as a subtype of QuantizedType**.
The architectural distinction is critical:

- **QuantizedType** represents different quantization schemes (uniform,
per-axis, etc.), semantic operations that map values into a
lower-precision domain
- **QuantileType** is purely a **storage format** that specifies how to
interpret indices within a lookup table (LUT)

QuantileType was never meant to function as a quantization scheme on its
own. Instead, its purpose is to indicate **how to interpret indices
based on the given LUT**. It is an orthogonal concern to quantization
semantics; it describes data organization, not mathematical
transformation.

### Relaxed Type Conditions

The previous implementation restricted the LUT values to float types
only. However, float types are not the only types that can exist inside
a LUT, integer types are valid as well.

This PR removes the type restriction, allowing **both floating-point and
integer-based LUT interpretations** to coexist, better matching actual
use cases.

## Changes

- **Removed**: Incorrect inheritance of `QuantizedType` by
`QuantileType`
- **Relaxed**: Type constraints to accept both float and integer LUT
value types
2026-07-29 02:39:11 -07:00
..
Bytecode QuantileType bytecode patch (#203495) 2026-06-12 23:20:54 +01:00
canonicalize.mlir
inlining.mlir
invalid-quantile-types.mlir QuantileType relax quantileType conditions and inheritance issue (#204793) 2026-07-29 02:39:11 -07:00
invalid.mlir
lower-quant-ops.mlir
normalize-quant-types.mlir
ops.mlir
parse-any-invalid.mlir
parse-any.mlir
parse-calibrated-invalid.mlir
parse-calibrated.mlir
parse-uniform-invalid.mlir Quantile Type and Low FP Support (#190321) 2026-06-02 15:14:42 +01:00
parse-uniform.mlir Quantile Type and Low FP Support (#190321) 2026-06-02 15:14:42 +01:00
quantile-types.mlir QuantileType relax quantileType conditions and inheritance issue (#204793) 2026-07-29 02:39:11 -07:00
strip-func-quant-types.mlir