diff --git a/mlir/include/mlir/Dialect/Quant/QuantTypes.h b/mlir/include/mlir/Dialect/Quant/QuantTypes.h --- a/mlir/include/mlir/Dialect/Quant/QuantTypes.h +++ b/mlir/include/mlir/Dialect/Quant/QuantTypes.h @@ -196,7 +196,8 @@ /// Note that for the any type, the expressed type is optional. class AnyQuantizedType : public Type::TypeBase { + detail::AnyQuantizedTypeStorage, + MemRefElementTypeInterface::Trait> { public: using Base::Base; using Base::getChecked; @@ -255,7 +256,8 @@ /// ZeroPoint: An integer value class UniformQuantizedType : public Type::TypeBase { + detail::UniformQuantizedTypeStorage, + MemRefElementTypeInterface::Trait> { public: using Base::Base; using Base::getChecked; @@ -313,7 +315,8 @@ /// ZeroPoint: An integer value class UniformQuantizedPerAxisType : public Type::TypeBase { + detail::UniformQuantizedPerAxisTypeStorage, + MemRefElementTypeInterface::Trait> { public: using Base::Base; using Base::getChecked; @@ -382,7 +385,8 @@ /// quant.calibrated> class CalibratedQuantizedType : public Type::TypeBase { + detail::CalibratedQuantizedTypeStorage, + MemRefElementTypeInterface::Trait> { public: using Base::Base; using Base::getChecked; diff --git a/mlir/test/Dialect/Quant/parse-uniform.mlir b/mlir/test/Dialect/Quant/parse-uniform.mlir --- a/mlir/test/Dialect/Quant/parse-uniform.mlir +++ b/mlir/test/Dialect/Quant/parse-uniform.mlir @@ -154,3 +154,11 @@ %0 = "foo"() : () -> !qalias return %0 : !qalias } + +// ----- +// MemRef of quantized type +// CHECK: memref<1x2x3x4x!quant.uniform> +!qalias = type !quant.uniform +func @parse(%arg : memref<1x2x3x4x!qalias>) { + return +}