| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/IR/ |
| H A D | QuantTypes.cpp | 23 unsigned QuantizedType::getFlags() const { in getFlags() 27 bool QuantizedType::classof(Type type) { in classof() 63 Type QuantizedType::getStorageType() const { in getStorageType() 67 int64_t QuantizedType::getStorageTypeMin() const { in getStorageTypeMin() 71 int64_t QuantizedType::getStorageTypeMax() const { in getStorageTypeMax() 81 Type QuantizedType::getExpressedType() const { in getExpressedType() 93 QuantizedType 98 return elementType.dyn_cast<QuantizedType>(); in getQuantizedElementType() 127 if (quantizedType.isa<QuantizedType>()) { in castToStorageType() 134 if (!sType.getElementType().isa<QuantizedType>()) { in castToStorageType() [all …]
|
| H A D | TypeParser.cpp | 55 storageTypeWidth > QuantizedType::MaxStorageBits) { in parseStorageType() 68 int64_t defaultIntegerMin = QuantizedType::getDefaultMinimumForInteger( in parseStorageRange() 70 int64_t defaultIntegerMax = QuantizedType::getDefaultMaximumForInteger( in parseStorageRange() 339 static void printStorageType(QuantizedType type, DialectAsmPrinter &out) { in printStorageType() 351 QuantizedType::getDefaultMinimumForInteger(isSigned, storageWidth); in printStorageType() 353 QuantizedType::getDefaultMaximumForInteger(isSigned, storageWidth); in printStorageType()
|
| H A D | QuantOps.cpp | 56 if (auto quantizedType = spec.dyn_cast<QuantizedType>()) in isValidQuantizationSpec()
|
| /llvm-project-15.0.7/mlir/lib/CAPI/Dialect/ |
| H A D | Quant.cpp | 23 return unwrap(type).isa<quant::QuantizedType>(); in MLIR_DEFINE_CAPI_DIALECT_REGISTRATION() 32 return quant::QuantizedType::getDefaultMinimumForInteger(isSigned, in mlirQuantizedTypeGetDefaultMinimumForInteger() 38 return quant::QuantizedType::getDefaultMaximumForInteger(isSigned, in mlirQuantizedTypeGetDefaultMaximumForInteger() 47 return unwrap(type).cast<quant::QuantizedType>().getFlags(); in mlirQuantizedTypeGetFlags() 51 return unwrap(type).cast<quant::QuantizedType>().isSigned(); in mlirQuantizedTypeIsSigned() 59 return unwrap(type).cast<quant::QuantizedType>().getStorageTypeMin(); in mlirQuantizedTypeGetStorageTypeMin() 63 return unwrap(type).cast<quant::QuantizedType>().getStorageTypeMax(); in mlirQuantizedTypeGetStorageTypeMax() 68 .cast<quant::QuantizedType>() in mlirQuantizedTypeGetStorageTypeIntegralWidth() 89 return wrap(quant::QuantizedType::castToStorageType( in mlirQuantizedTypeCastToStorageType() 90 unwrap(type).cast<quant::QuantizedType>())); in mlirQuantizedTypeCastToStorageType() [all …]
|
| /llvm-project-15.0.7/mlir/test/python/dialects/ |
| H A D | quant.py | 23 assert not quant.QuantizedType.isinstance(i8) 24 assert quant.QuantizedType.isinstance(any) 25 assert quant.QuantizedType.isinstance(uniform) 26 assert quant.QuantizedType.isinstance(per_axis) 27 assert quant.QuantizedType.isinstance(calibrated) 44 any = quant.AnyQuantizedType.get(quant.QuantizedType.FLAG_SIGNED, i8, f32, 95 quant.QuantizedType.FLAG_SIGNED, 99 storage_type_min=quant.QuantizedType.default_minimum_for_integer( 101 storage_type_max=quant.QuantizedType.default_maximum_for_integer(
|
| /llvm-project-15.0.7/mlir/python/mlir/_mlir_libs/_mlir/dialects/ |
| H A D | quant.pyi | 10 "QuantizedType", 17 class QuantizedType(Type): 68 class AnyQuantizedType(QuantizedType): 76 class UniformQuantizedType(QuantizedType): 93 class UniformQuantizedPerAxisType(QuantizedType): 114 def CalibratedQuantizedType(QuantizedType):
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Quant/ |
| H A D | QuantTypes.h | 52 class QuantizedType : public Type { 139 static QuantizedType getQuantizedElementType(Type primitiveOrContainerType); 198 : public Type::TypeBase<AnyQuantizedType, QuantizedType, 257 : public Type::TypeBase<UniformQuantizedType, QuantizedType, 315 : public Type::TypeBase<UniformQuantizedPerAxisType, QuantizedType, 384 : public Type::TypeBase<CalibratedQuantizedType, QuantizedType,
|
| H A D | QuantizeUtils.h | 17 class QuantizedType; variable 36 Attribute quantizeAttr(Attribute realValue, QuantizedType quantizedElementType,
|
| H A D | QuantOpsBase.td | 37 // An implementation of QuantizedType. 39 Type<CPred<"$_self.isa<mlir::quant::QuantizedType>()">, "QuantizedType">;
|
| H A D | UniformSupport.h | 40 Type convert(QuantizedType elementalType) const;
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/ |
| H A D | QuantizeUtils.cpp | 23 Attribute origRealValue, QuantizedType quantizedElementType, in convertPrimitiveValueAttr() 40 QuantizedType quantizedElementType, in convertDenseFPElementsAttr() 71 QuantizedType quantizedElementType, in convertSparseElementsAttr() 128 QuantizedType quantizedElementType, in quantizeAttr()
|
| H A D | UniformSupport.cpp | 35 Type ExpressedToQuantizedConverter::convert(QuantizedType elementalType) const { in convert()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/Transforms/ |
| H A D | ConvertConst.cpp | 53 QuantizedType quantizedElementType = in matchAndRewrite() 54 QuantizedType::getQuantizedElementType(qbarrierResultType); in matchAndRewrite() 58 if (!QuantizedType::castToStorageType(qbarrierResultType)) { in matchAndRewrite()
|
| H A D | ConvertSimQuant.cpp | 56 QuantizedType elementType = in failableRewrite() 88 QuantizedType convertFakeQuantAttrsToType(ConstFakeQuant fqOp, in convertFakeQuantAttrsToType() 107 QuantizedType convertFakeQuantAttrsToType(ConstFakeQuantPerAxis fqOp, in convertFakeQuantAttrsToType()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Utils/ |
| H A D | QuantUtils.cpp | 109 ((input_type).getElementType().dyn_cast<quant::QuantizedType>()) 272 quant::QuantizedType retType; in buildQTypeFromMinMax()
|
| /llvm-project-15.0.7/mlir/docs/ |
| H A D | Quantization.md | 181 between types based on a QuantizedType and its *expressed* and *storage* 205 * QuantizedType base class 210 * qcast : Convert from an expressed type to QuantizedType 211 * dcast : Convert from a QuantizedType to its expressed type 212 * scast : Convert between a QuantizedType and its storage type
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Tosa/IR/ |
| H A D | TosaTypesBase.td | 27 : Type<And<[CPred<"$_self.isa<mlir::quant::QuantizedType>()">, 28 CPred<"$_self.cast<mlir::quant::QuantizedType>()" #
|