Home
last modified time | relevance | path

Searched refs:vecType (Results 1 – 25 of 35) sorted by relevance

12

/llvm-project/mlir/lib/Dialect/Vector/Transforms/
H A DVectorLinearize.cpp31 VectorType vecType = dyn_cast<VectorType>(resType); in isLessThanTargetBitWidth() local
33 if (!vecType || vecType.getElementType().isIndex()) in isLessThanTargetBitWidth()
36 if (vecType.getRank() == 0) in isLessThanTargetBitWidth()
39 vecType.getShape().back() * vecType.getElementTypeBitWidth(); in isLessThanTargetBitWidth()
47 VectorType vecType = dyn_cast<VectorType>(t); in isLessThanOrEqualTargetBitWidth() local
49 if (!vecType || vecType.getElementType().isIndex()) in isLessThanOrEqualTargetBitWidth()
52 if (vecType in isLessThanOrEqualTargetBitWidth()
[all...]
H A DLowerVectorTransfer.cpp535 auto vecType = loadOp.getVectorType(); matchAndRewrite() local
554 auto vecType = storeOp.getVectorType(); matchAndRewrite() local
H A DVectorDropLeadUnitDim.cpp513 auto vecType = dyn_cast<VectorType>(op->getResultTypes()[0]); in matchAndRewrite() local
514 if (!vecType) in matchAndRewrite()
516 VectorType newVecType = trimLeadingOneDims(vecType); in matchAndRewrite()
517 if (newVecType == vecType) in matchAndRewrite()
519 int64_t dropDim = vecType.getRank() - newVecType.getRank(); in matchAndRewrite()
532 rewriter.replaceOpWithNewOp<vector::BroadcastOp>(op, vecType, in matchAndRewrite()
H A DLowerVectorContract.cpp418 auto vecType = dyn_cast<VectorType>(elementType); in promote() local
419 if (vecType) in promote()
420 elementType = vecType.getElementType(); in promote()
424 if (vecType) in promote()
425 promotedType = vecType.clone(promotedType); in promote()
459 std::optional<int64_t> getReductionSize(VectorType vecType, in getReductionSize()
462 if (vecType.getScalableDims()[reductionDim]) in getReductionSize()
464 int64_t reductionSize = vecType.getDimSize(reductionDim); in getReductionSize()
1308 VectorType vecType = dyn_cast<VectorType>(opResType); in matchAndRewriteMaskableOp()
1309 if (vecType in matchAndRewriteMaskableOp()
1310 if (auto vecType = dyn_cast<VectorType>(dstElementType)) matchAndRewriteMaskableOp() local
[all...]
H A DVectorDistribute.cpp470 VectorType vecType = writeOp.getVectorType();
472 if (vecType.getNumElements() > maxNumElementsToExtract) {
477 vecType.getNumElements(), maxNumElementsToExtract));
486 SmallVector<Type> retTypes = {vecType};
608 if (auto vecType = dyn_cast<VectorType>(distributedVal.getType())) { in tryExtractOp()
612 VectorType::get(vecType.getShape(), operandType.getElementType()); in tryExtractOp()
1290 VectorType vecType = insertOp.getDestVectorType(); in matchAndRewrite()
1295 if (vecType.getRank() > 1) { in matchAndRewrite()
1320 if (vecType.getRank() != 0) {
1328 if (vecType in matchAndRewrite()
590 VectorType vecType = writeOp.getVectorType(); tryExtractOp() local
696 if (auto vecType = dyn_cast<VectorType>(distributedVal.getType())) { matchAndRewrite() local
1429 VectorType vecType = insertOp.getDestVectorType(); matchAndRewrite() local
1686 if (auto vecType = dyn_cast<VectorType>(distType)) { matchAndRewrite() local
[all...]
H A DVectorTransferOpTransforms.cpp913 auto vecType = xferOp.getVectorType(); in matchAndRewrite()
914 if (!llvm::all_of(vecType.getShape(), [](int64_t sz) { return sz == 1; })) in matchAndRewrite()
924 if (vecType.getRank() == 0) { in matchAndRewrite()
930 SmallVector<int64_t> pos(vecType.getRank(), 0); in transferOpflowOpt()
895 auto vecType = xferOp.getVectorType(); matchAndRewrite() local
H A DVectorTransforms.cpp1200 auto vecType = dyn_cast<VectorType>(selectOp.getType()); in matchAndRewrite()
1201 if (!vecType || !vecType.getElementType().isInteger(1)) in matchAndRewrite()
1210 if (vecType.getRank() != 1 || vecType.isScalable()) in matchAndRewrite()
1214 if (vecType.getShape()[0] != 1) in matchAndRewrite()
1227 auto elemType = rewriter.getIntegerType(vecType.getNumElements());
1191 auto vecType = dyn_cast<VectorType>(selectOp.getType()); matchAndRewrite() local
/llvm-project/mlir/lib/Conversion/MathToLibm/
H A DMathToLibm.cpp78 auto vecType = dyn_cast<VectorType>(opType); in matchAndRewrite() local
80 if (!vecType) in matchAndRewrite()
82 if (!vecType.hasRank()) in matchAndRewrite()
84 auto shape = vecType.getShape(); in matchAndRewrite()
85 int64_t numElements = vecType.getNumElements(); in matchAndRewrite()
89 vecType, FloatAttr::get(vecType.getElementType(), 0.0))); in matchAndRewrite()
98 rewriter.create<Op>(loc, vecType.getElementType(), operands); in matchAndRewrite()
/llvm-project/mlir/lib/Dialect/NVGPU/Transforms/
H A DCreateAsyncGroups.cpp128 VectorType vecType) { in resultsInSupportedAsyncCopy() argument
129 assert(vecType.getRank() == 1 && "expected 1-D vector"); in resultsInSupportedAsyncCopy()
134 int64_t numElements = vecType.getNumElements(); in resultsInSupportedAsyncCopy()
135 Type elementType = vecType.getElementType(); in resultsInSupportedAsyncCopy()
193 VectorType vecType = cast<VectorType>(vectorVal.getType()); in createAsyncGroups() local
196 vecType) || in createAsyncGroups()
198 vecType)) in createAsyncGroups()
/llvm-project/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVOpDefinition.cpp44 if (auto vecType = llvm::dyn_cast<VectorType>(operandType)) in getUnaryOpResultType() local
45 return VectorType::get(vecType.getNumElements(), resultType); in getUnaryOpResultType()
/llvm-project/mlir/lib/Dialect/GPU/TransformOps/
H A DGPUTransformOps.cpp199 auto vecType = cast<VectorType>(extract.getResult().getType()); in getSubgroupMmaNativeVectorSize() local
200 if (sliceType && sliceType != vecType) in getSubgroupMmaNativeVectorSize()
202 sliceType = vecType; in getSubgroupMmaNativeVectorSize()
207 if (auto vecType = dyn_cast<VectorType>(op->getResultTypes()[0])) { in getSubgroupMmaNativeVectorSize() local
210 if (vecType.getRank() < 2) in getSubgroupMmaNativeVectorSize()
222 auto vecType = cast<VectorType>(extract.getResult().getType()); in getSubgroupMmaNativeVectorSize() local
223 if (sliceType && sliceType != vecType) in getSubgroupMmaNativeVectorSize()
225 sliceType = vecType; in getSubgroupMmaNativeVectorSize()
231 SmallVector<int64_t> nativeSize(vecType.getRank() - 2, 1); in getSubgroupMmaNativeVectorSize()
/llvm-project/mlir/lib/Conversion/GPUToNVVM/
H A DWmmaOpsToNvvm.cpp281 if (auto vecType = dyn_cast<VectorType>(type.getBody()[0])) { in matchAndRewrite() local
282 Value vecCst = rewriter.create<LLVM::UndefOp>(loc, vecType); in matchAndRewrite()
283 for (int64_t vecEl = 0; vecEl < vecType.getNumElements(); vecEl++) { in matchAndRewrite()
286 vecCst = rewriter.create<LLVM::InsertElementOp>(loc, vecType, vecCst, in matchAndRewrite()
305 if (auto vecType = dyn_cast<VectorType>(lhs.getType())) in createMinMaxF() local
306 i1Type = VectorType::get(vecType.getShape(), i1Type); in createMinMaxF()
/llvm-project/mlir/lib/Conversion/VectorToGPU/
H A DVectorToGPU.cpp189 auto vecType = dyn_cast<VectorType>(constantOp.getType()); in constantSupportsMMAMatrixType() local
190 if (!vecType || vecType.getRank() != 2) in constantSupportsMMAMatrixType()
632 if (auto vecType = dyn_cast<VectorType>(elType)) in getMmaSyncVectorOperandType()
633 elType = vecType.getElementType(); in getMmaSyncVectorOperandType()
826 if (auto vecType = dyn_cast<VectorType>(loadedElType)) { in createNonLdMatrixLoads()
827 loadedElType = vecType.getElementType(); in createNonLdMatrixLoads()
1083 auto vecType = cast<VectorType>(op.getType()); in convertConstantOp()
1085 vecType.getShape(), vecType in convertConstantOp()
630 if (auto vecType = dyn_cast<VectorType>(elType)) getMmaSyncVectorOperandType() local
824 if (auto vecType = dyn_cast<VectorType>(loadedElType)) { createNonLdMatrixLoads() local
1081 auto vecType = cast<VectorType>(op.getType()); convertConstantOp() local
1100 auto vecType = op.getResultVectorType(); convertBroadcastOp() local
[all...]
/llvm-project/mlir/lib/Dialect/LLVMIR/IR/
H A DLLVMTypes.cpp797 if (auto vecType = llvm::dyn_cast<VectorType>(type)) in isCompatibleOuterType()
798 return vecType.getRank() == 1; in isCompatibleOuterType()
821 .Case<VectorType>([&](auto vecType) { in isCompatibleImpl()
822 return vecType.getRank() == 1 && in isCompatibleImpl()
823 isCompatible(vecType.getElementType()); in isCompatibleImpl()
882 if (auto vecType = llvm::dyn_cast<VectorType>(type)) { in isCompatibleVectorType()
883 if (vecType.getRank() != 1) in isCompatibleVectorType()
885 Type elementType = vecType.getElementType(); in isCompatibleVectorType()
795 if (auto vecType = llvm::dyn_cast<VectorType>(type)) isCompatibleOuterType() local
819 __anonb2bfb0400c02(auto vecType) isCompatibleImpl() argument
880 if (auto vecType = llvm::dyn_cast<VectorType>(type)) { isCompatibleVectorType() local
/llvm-project/mlir/lib/Conversion/MathToFuncs/
H A DMathToFuncs.cpp109 auto vecType = dyn_cast<VectorType>(opType); in matchAndRewrite() local
111 if (!vecType) in matchAndRewrite()
113 if (!vecType.hasRank()) in matchAndRewrite()
115 ArrayRef<int64_t> shape = vecType.getShape(); in matchAndRewrite()
116 int64_t numElements = vecType.getNumElements(); in matchAndRewrite()
118 Type resultElementType = vecType.getElementType(); in matchAndRewrite()
125 loc, DenseElementsAttr::get(vecType, initValueAttr)); in matchAndRewrite()
134 rewriter.create<Op>(loc, vecType.getElementType(), operands); in matchAndRewrite()
/llvm-project/mlir/lib/Conversion/SPIRVToLLVM/
H A DSPIRVToLLVM.cpp41 if (auto vecType = dyn_cast<VectorType>(type))
42 return vecType.getElementType().isSignedInteger(); in isSignedIntegerOrVector()
50 if (auto vecType = dyn_cast<VectorType>(type))
51 return vecType.getElementType().isUnsignedInteger(); in isUnsignedIntegerOrVector()
60 if (auto vecType = dyn_cast<VectorType>(type))
61 if (auto intType = dyn_cast<IntegerType>(vecType.getElementType())) in getIntegerOrVectorElementWidth()
72 auto vecType = dyn_cast<VectorType>(type); in getBitWidth()
73 auto elementType = vecType.getElementType(); in getBitWidth()
89 if (auto vecType = dyn_cast<VectorType>(type)) { in getLLVMTypeBitWidth()
90 auto integerType = cast<IntegerType>(vecType in getLLVMTypeBitWidth()
45 if (auto vecType = dyn_cast<VectorType>(type)) isSignedIntegerOrVector() local
54 if (auto vecType = dyn_cast<VectorType>(type)) isUnsignedIntegerOrVector() local
64 if (auto vecType = dyn_cast<VectorType>(type)) getIntegerOrVectorElementWidth() local
76 auto vecType = dyn_cast<VectorType>(type); getBitWidth() local
93 if (auto vecType = dyn_cast<VectorType>(type)) { minusOneIntegerAttribute() local
117 if (auto vecType = dyn_cast<VectorType>(srcType)) { createFPConstant() local
506 if (auto vecType = dyn_cast<VectorType>(srcType)) matchAndRewrite() local
[all...]
/llvm-project/mlir/lib/Interfaces/
H A DDataLayoutInterfaces.cpp78 if (auto vecType = dyn_cast<VectorType>(type)) { in getDefaultTypeSizeInBits() local
79 uint64_t baseSize = vecType.getNumElements() / vecType.getShape().back() * in getDefaultTypeSizeInBits()
80 llvm::PowerOf2Ceil(vecType.getShape().back()) * in getDefaultTypeSizeInBits()
81 dataLayout.getTypeSize(vecType.getElementType()) * 8; in getDefaultTypeSizeInBits()
82 return llvm::TypeSize::get(baseSize, vecType.isScalable()); in getDefaultTypeSizeInBits()
/llvm-project/mlir/test/lib/Dialect/Vector/
H A DTestVectorTransforms.cpp94 auto vecType = cast<VectorType>(extract.getResult().getType()); in getShape() local
95 if (dstVec && dstVec != vecType) in getShape()
97 dstVec = vecType; in getShape()
636 VectorType vecType = dyn_cast<VectorType>(val.getType()); in runOnOperation() local
637 int64_t vecRank = vecType ? vecType.getRank() : 0; in runOnOperation()
/llvm-project/mlir/lib/Conversion/VectorToSCF/
H A DVectorToSCF.cpp426 auto vecType = dyn_cast<VectorType>(bufferType.getElementType()); in rewriteOp()
429 loc, vecType, xferOp.getSource(), xferIndices,
450 auto vecType = dyn_cast<VectorType>(bufferType.getElementType()); in cleanup()
451 auto vec = b.create<vector::SplatOp>(loc, vecType, xferOp.getPadding()); in cleanup()
1311 auto vecType = dyn_cast<VectorType>(vec.getType()); in matchAndRewrite()
1323 rewriter, xferOp, iv, unpackedDim(xferOp), TypeRange(vecType),
1658 auto vecType = xferOp.getVectorType();
1661 rewriter.create<arith::ConstantIndexOp>(loc, vecType.getDimSize(0));
1662 if (vecType.isScalable()) {
417 auto vecType = dyn_cast<VectorType>(bufferType.getElementType()); rewriteOp() local
441 auto vecType = dyn_cast<VectorType>(bufferType.getElementType()); handleOutOfBoundsDim() local
1120 auto vecType = dyn_cast<VectorType>(vec.getType()); matchAndRewrite() local
1467 auto vecType = xferOp.getVectorType(); matchAndRewrite() local
/llvm-project/mlir/lib/Dialect/Vector/IR/
H A DVectorOps.cpp509 auto vecType = getSourceVectorType(); in matchAndRewrite()
510 return VectorType::get(vecType.getShape(), in matchAndRewrite()
511 IntegerType::get(vecType.getContext(), /*width=*/1), in matchAndRewrite()
512 vecType.getScalableDims()); in matchAndRewrite()
619 auto vecType = getSourceVectorType(); in getVectorReductionOp()
620 return VectorType::get(vecType.getShape(), in getVectorReductionOp()
621 IntegerType::get(vecType.getContext(), /*width=*/1), in getVectorReductionOp()
622 vecType.getScalableDims()); in getVectorReductionOp()
1650 auto vecType = dyn_cast<VectorType>(type); in foldExtractFromBroadcast()
1651 return vecType in foldExtractFromBroadcast()
493 auto vecType = getSourceVectorType(); getExpectedMaskType() local
603 auto vecType = getSourceVectorType(); getExpectedMaskType() local
1616 auto vecType = dyn_cast<VectorType>(type); hasZeroDimVectors() local
1785 if (auto vecType = llvm::dyn_cast<VectorType>(extractOp.getType())) foldExtractFromExtractStrided() local
1897 auto vecType = llvm::cast<VectorType>(fromElementsOp.getType()); foldScalarExtractFromFromElements() local
3333 auto vecType = this->getResultVectorType(); getExpectedMaskType() local
3988 inferTransferOpMaskType(VectorType vecType,AffineMap permMap) inferTransferOpMaskType() argument
4985 auto vecType = this->getIndexVectorType(); getExpectedMaskType() local
[all...]
/llvm-project/clang/lib/Sema/
H A DSemaExprMember.cpp380 const ExtVectorType *vecType = baseType->castAs<ExtVectorType>(); in CheckExtVectorComponent()
405 (Idx = vecType->getPointAccessorIdx(*compStr)) != -1) { in CheckExtVectorComponent()
414 } while (*compStr && (Idx = vecType->getPointAccessorIdx(*compStr)) != -1); in CheckExtVectorComponent()
427 while ((Idx = vecType->getNumericAccessorIdx(*compStr)) != -1) { in CheckExtVectorComponent()
454 if (!vecType->isAccessorWithinNumElements(*compStr++, HexSwizzle)) { in CheckExtVectorComponent()
482 unsigned CompSize = HalvingSwizzle ? (vecType->getNumElements() + 1) / 2 in CheckExtVectorComponent()
488 return vecType->getElementType(); in CheckExtVectorComponent()
493 QualType VT = S.Context.getExtVectorType(vecType->getElementType(), CompSize); in CheckExtVectorComponent()
381 const ExtVectorType *vecType = baseType->getAs<ExtVectorType>(); CheckExtVectorComponent() local
/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
H A DVectorization.cpp1298 auto vecType = dyn_cast<VectorType>(vecOperand.getType()); in vectorizeAsLinalgGeneric()
1299 if (vecType && (!firstMaxRankedType || in vectorizeAsLinalgGeneric()
1300 firstMaxRankedType.getRank() < vecType.getRank())) in vectorizeAsLinalgGeneric()
1301 firstMaxRankedType = vecType; in vectorizeAsLinalgGeneric()
1310 auto vecType = VectorType::get(firstMaxRankedType.getShape(), in vectorizeAsLinalgGeneric()
1313 vecOperands.push_back(broadcastIfNeeded(rewriter, vecOperand, vecType)); in vectorizeAsLinalgGeneric()
2671 auto vecType = VectorType::get(vecShape, sourceType.getElementType()); in matchAndRewrite()
2675 vecType.getRank(), in matchAndRewrite()
2678 sliceOp.getLoc(), vecType, sliceOp.getSource(), readIndices, padValue, in matchAndRewrite()
2741 auto vecType in matchAndRewrite()
1224 auto vecType = dyn_cast<VectorType>(vecOperand.getType()); vectorizeOneOp() local
1236 auto vecType = VectorType::get(firstMaxRankedType.getShape(), vectorizeOneOp() local
2212 auto vecType = VectorType::get(vecShape, sourceType.getElementType()); tryVectorizeCopy() local
2519 auto vecType = VectorType::get(padOp.getType().getShape(), rewriteUser() local
[all...]
/llvm-project/mlir/include/mlir/Dialect/Vector/IR/
H A DVectorOps.h183 /// vecType = vector<1x2x3xf32>, permMap = affine_map<(d0, d1, d2) -> (d1, d0)>
188 VectorType inferTransferOpMaskType(VectorType vecType, AffineMap permMap);
/llvm-project/mlir/lib/Dialect/SPIRV/Transforms/
H A DSPIRVConversion.cpp53 static std::optional<SmallVector<int64_t>> getTargetShape(VectorType vecType) { in checkExtensionRequirements()
55 if (vecType.isScalable()) { in checkExtensionRequirements()
60 SmallVector<int64_t> unrollShape = llvm::to_vector<4>(vecType.getShape()); in checkExtensionRequirements()
62 1, mlir::spirv::getComputeVectorSize(vecType.getShape().back())); in checkExtensionRequirements()
196 if (auto vecType = dyn_cast<VectorType>(type)) { in getTypeNumBytes()
197 auto elementSize = getTypeNumBytes(options, vecType.getElementType()); in getTypeNumBytes()
200 return vecType.getNumElements() * *elementSize; in getTypeNumBytes()
591 if (auto vecType = dyn_cast<VectorType>(elementType)) { in convertMemrefType()
593 convertVectorType(targetEnv, options, vecType, storageClass); in convertMemrefType()
1333 if (auto vecType
163 if (auto vecType = dyn_cast<VectorType>(type)) { getTypeNumBytes() local
549 if (auto vecType = dyn_cast<VectorType>(elementType)) { convertMemrefType() local
[all...]
/llvm-project/mlir/lib/Conversion/ArithToSPIRV/
H A DArithToSPIRV.cpp108 if (auto vecType = dyn_cast<VectorType>(type)) in isBoolScalarOrVector() local
109 return vecType.getElementType().isInteger(1); in isBoolScalarOrVector()
137 else if (auto vecType = dyn_cast<VectorType>(type)) in hasSameBitwidth() local
138 bw = vecType.getElementTypeBitWidth() * vecType.getNumElements(); in hasSameBitwidth()

12