[Mlir-commits] [mlir] Extending UniformQuantizedType with interface-based support for new storage types in Quant dialect (PR #152966)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 20 02:55:12 PDT 2025
================
@@ -486,12 +495,9 @@ Type QuantDialect::parseType(DialectAsmParser &parser) const {
static void printStorageType(QuantizedType type, DialectAsmPrinter &out) {
// storage type
- unsigned storageWidth = type.getStorageTypeIntegralWidth();
- bool isSigned = type.isSigned();
- if (isSigned) {
- out << "i" << storageWidth;
- } else {
- out << "u" << storageWidth;
+ if (auto quantizationInterface =
+ llvm::dyn_cast<QuantizationInterface>(type.getStorageType())) {
+ out << quantizationInterface.getStorageType();
----------------
Roman-Pevnyi wrote:
@javedabsar1 I will remove this check. In fact its redundant here because Printing assumes the type is valid as Parser validates it in parseStorageType function.
https://github.com/llvm/llvm-project/pull/152966
More information about the Mlir-commits
mailing list