[Mlir-commits] [mlir] Extending UniformQuantizedType with interface-based support for new storage types in Quant dialect (PR #152966)
Renato Golin
llvmlistbot at llvm.org
Mon Aug 11 03:21:31 PDT 2025
rengolin wrote:
I think we need to decide first if we want a contiguous storage type for sub-byte types or not.
For example:
* `int4` and `fp4` can have `size = 4, storage_size = 8` but still _pack_ two elements per byte.
* `fp6` can be represented in two lists (4 + 2 bits), and those lists themselves be packed or not.
Depending on the answers is what this interface would look like.
The second question is if we want to have an MX type (tuple of vectors, with payload, scaling factor, storage type and element type). If we do, then the conversion between the MX and non-MX would be in an MX dialect (potentially `quant`), and if we make MX types native in MLIR, then in theory, we could tile and fuse them by teaching those patterns to descend into the sub-types.
I don't mind experimenting with it like your implementation, but it would be good to know what folks would prefer as a final destination, so that we go all to the same place.
https://github.com/llvm/llvm-project/pull/152966
More information about the Mlir-commits
mailing list