| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/ |
| H A D | UniformSupport.cpp | 16 static bool isQuantizablePrimitiveType(Type inputType) { in isQuantizablePrimitiveType() argument 17 return inputType.isa<FloatType>(); in isQuantizablePrimitiveType() 21 ExpressedToQuantizedConverter::forInputType(Type inputType) { in forInputType() argument 22 if (inputType.isa<TensorType, VectorType>()) { in forInputType() 25 return ExpressedToQuantizedConverter{inputType, nullptr}; in forInputType() 26 return ExpressedToQuantizedConverter{inputType, elementType}; in forInputType() 29 if (isQuantizablePrimitiveType(inputType)) in forInputType() 30 return ExpressedToQuantizedConverter{inputType, inputType}; in forInputType() 32 return ExpressedToQuantizedConverter{inputType, nullptr}; in forInputType() 37 if (auto tensorType = inputType.dyn_cast<RankedTensorType>()) in convert() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Utils/ |
| H A D | QuantUtils.cpp | 119 auto inputType = input.getType().dyn_cast<ShapedType>(); in buildConvOpQuantizationAttr() local 122 if (!inputType || !weightType) in buildConvOpQuantizationAttr() 125 auto inputQType = GET_UQTYPE(inputType); in buildConvOpQuantizationAttr() 192 auto inputType = input.getType().dyn_cast<ShapedType>(); in buildUnaryOpQuantizationAttr() local 195 if (!inputType || !outputType) in buildUnaryOpQuantizationAttr() 198 auto inputQType = GET_UQTYPE(inputType); in buildUnaryOpQuantizationAttr() 218 auto inputType = input.getType().dyn_cast<ShapedType>(); in buildPadOpQuantizationAttr() local 220 if (!inputType) in buildPadOpQuantizationAttr() 223 auto inputQType = GET_UQTYPE(inputType); in buildPadOpQuantizationAttr() 241 assert(inputType && weightType && in buildConvOpResultTypeInfo() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Transforms/ |
| H A D | TosaFoldConstantTranspose.cpp | 48 auto inputType = op.getInput1().getType().cast<ShapedType>(); in matchAndRewrite() local 49 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite() 50 int64_t numElements = inputType.getNumElements(); in matchAndRewrite() 62 SmallVector<uint64_t, 6> srcIndices(inputType.getRank(), 0); in matchAndRewrite() 64 for (int dim = inputType.getRank() - 1; dim >= 0; --dim) { in matchAndRewrite()
|
| H A D | TosaDecomposeDepthwise.cpp | 31 ShapedType inputType = input.getType().cast<ShapedType>(); in matchAndRewrite() local 34 Type inputEType = inputType.getElementType(); in matchAndRewrite() 36 if (!(inputType.hasStaticShape() && weightType.hasStaticShape() && in matchAndRewrite() 60 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite()
|
| H A D | TosaDecomposeConv2D.cpp | 30 ShapedType inputType = input.getType().cast<ShapedType>(); in matchAndRewrite() local 35 llvm::count_if(inputType.getShape(), ShapedType::isDynamic); in matchAndRewrite() 54 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite() 60 RankedTensorType::get(revisedInputShape, inputType.getElementType()); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch3/mlir/ |
| H A D | Dialect.cpp | 265 auto inputType = *operand_type_begin(); in verify() local 269 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 273 return emitError() << "type of return operand (" << inputType in verify() 289 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 291 if (!inputType || !resultType) in verify() 294 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch2/mlir/ |
| H A D | Dialect.cpp | 265 auto inputType = *operand_type_begin(); in verify() local 269 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 273 return emitError() << "type of return operand (" << inputType in verify() 289 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 291 if (!inputType || !resultType) in verify() 294 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/ |
| H A D | VectorTransferOpTransforms.cpp | 222 targetShape, inputType, offsets, sizes, strides); in dropUnitDims() 231 MemRefType inputType = input.getType().cast<MemRefType>(); in rankReducingSubviewDroppingUnitDims() local 232 assert(inputType.hasStaticShape()); in rankReducingSubviewDroppingUnitDims() 233 SmallVector<int64_t> subViewOffsets(inputType.getRank(), 0); in rankReducingSubviewDroppingUnitDims() 234 SmallVector<int64_t> subViewStrides(inputType.getRank(), 1); in rankReducingSubviewDroppingUnitDims() 235 ArrayRef<int64_t> subViewSizes = inputType.getShape(); in rankReducingSubviewDroppingUnitDims() 237 dropUnitDims(inputType, subViewOffsets, subViewSizes, subViewStrides); in rankReducingSubviewDroppingUnitDims() 239 canonicalizeStridedLayout(inputType)) in rankReducingSubviewDroppingUnitDims() 376 ShapedType inputType = input.getType().cast<ShapedType>(); in collapseInnerDims() local 377 if (inputType.getRank() == 1) in collapseInnerDims() [all …]
|
| /llvm-project-15.0.7/mlir/test/lib/Dialect/Tosa/ |
| H A D | TosaTestPasses.cpp | 44 auto inputType = in matchAndRewrite() local 47 if (!inputType) in matchAndRewrite() 114 auto inputType = in matchAndRewrite() local 118 if (!inputType) in matchAndRewrite() 135 inputType.getElementType().dyn_cast<mlir::quant::UniformQuantizedType>(); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch6/mlir/ |
| H A D | Dialect.cpp | 377 auto inputType = *operand_type_begin(); in verify() local 381 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 385 return emitError() << "type of return operand (" << inputType in verify() 407 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 409 if (!inputType || !resultType) in verify() 412 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch4/mlir/ |
| H A D | Dialect.cpp | 377 auto inputType = *operand_type_begin(); in verify() local 381 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 385 return emitError() << "type of return operand (" << inputType in verify() 407 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 409 if (!inputType || !resultType) in verify() 412 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch5/mlir/ |
| H A D | Dialect.cpp | 377 auto inputType = *operand_type_begin(); in verify() local 381 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 385 return emitError() << "type of return operand (" << inputType in verify() 407 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 409 if (!inputType || !resultType) in verify() 412 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SparseTensor/IR/ |
| H A D | SparseTensorDialect.cpp | 336 Type inputType = getX().getType(); in verify() local 345 TypeRange{inputType}, outputType); in verify() 361 Type inputType = getX().getType(); in verify() local 368 this, formula, "reduce", TypeRange{inputType, inputType}, inputType); in verify()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/IR/ |
| H A D | QuantOps.cpp | 77 Type inputType = std::get<0>(input); in verify() local 79 if (!isValidQuantizationSpec(inputSpec, inputType)) { in verify() 81 << " and input type " << inputType; in verify()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch2/ |
| H A D | toyc.cpp | 42 static cl::opt<enum InputType> inputType( 76 if (inputType != InputType::MLIR && in dumpMLIR() 112 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch3/ |
| H A D | toyc.cpp | 44 static cl::opt<enum InputType> inputType( 77 if (inputType != InputType::MLIR && in loadMLIR() 131 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch4/ |
| H A D | toyc.cpp | 45 static cl::opt<enum InputType> inputType( 78 if (inputType != InputType::MLIR && in loadMLIR() 140 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch7/mlir/ |
| H A D | Dialect.cpp | 404 auto inputType = *operand_type_begin(); in verify() local 408 if (inputType == resultType || inputType.isa<mlir::UnrankedTensorType>() || in verify() 412 return emitError() << "type of return operand (" << inputType in verify() 462 auto inputType = getOperand().getType().dyn_cast<RankedTensorType>(); in verify() local 464 if (!inputType || !resultType) in verify() 467 auto inputShape = inputType.getShape(); in verify()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch5/ |
| H A D | toyc.cpp | 47 static cl::opt<enum InputType> inputType( 82 if (inputType != InputType::MLIR && in loadMLIR() 163 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/IR/ |
| H A D | TosaCanonicalizations.cpp | 303 ShapedType inputType = input.getType().cast<ShapedType>(); in matchAndRewrite() local 306 if (!inputType.hasStaticShape() || !outputType.hasStaticShape()) { in matchAndRewrite() 316 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite() 337 auto inputType = in matchAndRewrite() local 339 auto inputElementType = inputType.getElementType(); in matchAndRewrite() 341 if (!inputType.hasStaticShape()) { in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch6/ |
| H A D | toyc.cpp | 53 static cl::opt<enum InputType> inputType( 102 if (inputType != InputType::MLIR && in loadMLIR() 182 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/examples/toy/Ch7/ |
| H A D | toyc.cpp | 53 static cl::opt<enum InputType> inputType( 102 if (inputType != InputType::MLIR && in loadMLIR() 183 if (inputType == InputType::MLIR) { in dumpAST()
|
| /llvm-project-15.0.7/mlir/lib/Interfaces/ |
| H A D | ControlFlowInterfaces.cpp | 137 Type inputType = std::get<1>(typesIdx.value()); in verifyTypesAlongAllEdges() local 138 if (!regionInterface.areTypesCompatible(sourceType, inputType)) { in verifyTypesAlongAllEdges() 143 << inputType; in verifyTypesAlongAllEdges()
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Quant/ |
| H A D | UniformSupport.h | 36 static ExpressedToQuantizedConverter forInputType(Type inputType); 47 const Type inputType; member
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Linalg/Transforms/ |
| H A D | Detensorize.cpp | 28 auto inputType = inputs[0].getType(); in sourceMaterializationCallback() local 29 if (inputType.isa<TensorType>()) in sourceMaterializationCallback() 35 loc, RankedTensorType::get({}, inputType), inputs[0]); in sourceMaterializationCallback()
|