| /llvm-project-15.0.7/mlir/test/Dialect/Affine/ |
| H A D | memref-stride-calculation.mlir | 6 // CHECK: MemRefType offset: 0 strides: 20, 5, 1 8 // CHECK: MemRefType offset: 0 strides: ?, ?, 1 10 // CHECK: MemRefType offset: 0 strides: ?, 5, 1 12 // CHECK: MemRefType offset: 0 strides: 20, 5, 1 14 // CHECK: MemRefType offset: 0 strides: ?, ?, 1 16 // CHECK: MemRefType offset: 0 strides: ?, ?, 1 19 // CHECK: MemRefType offset: 0 strides: 20, 5, 1 23 // CHECK: MemRefType offset: 0 strides: ?, ?, 1 52 // CHECK: MemRefType offset: 0 strides: 1 58 // CHECK: MemRefType offset: ? strides: [all …]
|
| /llvm-project-15.0.7/mlir/test/python/integration/dialects/linalg/ |
| H A D | opsrun.py | 211 MemRefType.get((), f32), MemRefType.get((4, 8), f32), 218 MemRefType.get((), f32), MemRefType.get((4, 8), f32), 250 MemRefType.get((), f32), MemRefType.get((4, 8), f32), 257 MemRefType.get((), f32), MemRefType.get((4, 8), f32), 291 MemRefType.get((4, 16), i8), MemRefType.get((16, 8), f32), 297 MemRefType.get((4, 16), i8), MemRefType.get((16, 8), f32), 328 MemRefType.get((4, 16), i8), MemRefType.get((16, 8), f32), 334 MemRefType.get((4, 16), i8), MemRefType.get((16, 8), f32), 490 MemRefType.get((1, 4, 16, 1), f64), MemRefType.get((2, 2), f64), 521 MemRefType.get((1, 4, 16, 1), f64), MemRefType.get((2, 2), f64), [all …]
|
| /llvm-project-15.0.7/mlir/lib/IR/ |
| H A D | BuiltinTypes.cpp | 406 MemRefType::Builder builder(cast<MemRefType>()); in cloneWith() 538 MemRefType::Builder & 549 MemRefType MemRefType::get(ArrayRef<int64_t> shape, Type elementType, in get() 564 MemRefType MemRefType::getChecked( in getChecked() 580 MemRefType MemRefType::get(ArrayRef<int64_t> shape, Type elementType, in get() 598 MemRefType 618 MemRefType MemRefType::get(ArrayRef<int64_t> shape, Type elementType, in get() 637 MemRefType 949 MemRefType mlir::canonicalizeStridedLayout(MemRefType t) { in canonicalizeStridedLayout() 1024 MemRefType mlir::eraseStridedLayout(MemRefType t) { in eraseStridedLayout() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/IR/ |
| H A D | MemRefOps.cpp | 197 MemRefType newMemRefType = in matchAndRewrite() 517 MemRefType sourceType = castOp.getSource().getType().dyn_cast<MemRefType>(); in canFoldIntoConsumerOp() 518 MemRefType resultType = castOp.getType().dyn_cast<MemRefType>(); in canFoldIntoConsumerOp() 796 computeMemRefRankReductionMask(MemRefType originalType, MemRefType reducedType, in computeMemRefRankReductionMask() 1399 MemRefType type; in parse() 1898 static MemRefType 2128 return MemRefType::get( in inferResultType() 2306 static bool haveCompatibleOffsets(MemRefType t1, MemRefType t2) { in haveCompatibleOffsets() 2438 MemRefType currentResultType, MemRefType currentSourceType, in getCanonicalSubViewResultType() 2467 MemRefType currentResultType, MemRefType sourceType, in getCanonicalSubViewResultType() [all …]
|
| /llvm-project-15.0.7/mlir/unittests/IR/ |
| H A D | ShapedTypeTest.cpp | 33 (ShapedType)MemRefType::Builder(memrefOriginalShape, memrefOriginalType) in TEST() 40 (ShapedType)MemRefType::Builder(memrefNewShape, memrefOriginalType) in TEST() 47 (MemRefType)MemRefType::Builder(memrefOriginalShape, memrefNewType) in TEST() 52 (MemRefType)MemRefType::Builder(memrefNewShape, memrefNewType) in TEST() 60 (MemRefType)MemRefType::Builder(memrefNewShape, memrefOriginalType) in TEST() 65 (MemRefType)MemRefType::Builder(memrefNewShape, memrefNewType) in TEST()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/Transforms/ |
| H A D | NormalizeMemRefs.cpp | 172 if (oldMemRef.getType().isa<MemRefType>()) in areMemRefsNormalizable() 183 if (oldMemRef.getType().isa<MemRefType>()) in areMemRefsNormalizable() 216 MemRefType memrefType = opType.dyn_cast<MemRefType>(); in updateFunctionSignature() 347 MemRefType memrefType = argType.dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs() 356 MemRefType newMemRefType = normalizeMemRefType(memrefType, b, in normalizeFuncOpMemRefs() 411 MemRefType oldMemRefType = oldMemRef.getType().dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs() 415 MemRefType newMemRefType = newMemRef.getType().cast<MemRefType>(); in normalizeFuncOpMemRefs() 455 MemRefType memrefType = resType.dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs() 464 MemRefType newMemRefType = normalizeMemRefType(memrefType, b, in normalizeFuncOpMemRefs() 496 MemRefType memrefType = resultType.dyn_cast<MemRefType>(); in createOpResultsNormalized() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir/IR/ |
| H A D | BuiltinTypes.h | 165 class MemRefType::Builder { 168 explicit Builder(MemRefType other) in Builder() 199 operator MemRefType() { in MemRefType() function 370 return type.isa<MemRefType, UnrankedMemRefType>(); in classof() 436 LogicalResult getStridesAndOffset(MemRefType t, 439 LogicalResult getStridesAndOffset(MemRefType t, 467 MemRefType canonicalizeStridedLayout(MemRefType t); 471 MemRefType eraseStridedLayout(MemRefType t); 497 bool isStrided(MemRefType t); 501 AffineMap getStridedLinearLayoutMap(MemRefType t); [all …]
|
| /llvm-project-15.0.7/mlir/unittests/Dialect/MemRef/ |
| H A D | InferShapeTest.cpp | 22 auto sourceMemref = MemRefType::get({10, 5}, b.getIndexType()); in TEST() 28 MemRefType::get({2}, b.getIndexType(), AffineMap::get(1, 0, dim0 + 13)); in TEST() 38 auto sourceMemref = MemRefType::get({10, 5}, b.getIndexType(), in TEST() 43 MemRefType::get({2}, b.getIndexType(), AffineMap::get(1, 0, dim0 + 2003)); in TEST() 52 auto sourceMemref = MemRefType::get({10, 5}, b.getIndexType(), in TEST() 57 MemRefType::get({}, b.getIndexType(), in TEST()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/ |
| H A D | VectorTransferOpTransforms.cpp | 216 static MemRefType dropUnitDims(MemRefType inputType, ArrayRef<int64_t> offsets, in dropUnitDims() 231 MemRefType inputType = input.getType().cast<MemRefType>(); in rankReducingSubviewDroppingUnitDims() 236 MemRefType resultType = in rankReducingSubviewDroppingUnitDims() 268 MemRefType sourceType = source.getType().dyn_cast<MemRefType>(); in matchAndRewrite() 311 MemRefType sourceType = source.getType().dyn_cast<MemRefType>(); in matchAndRewrite() 423 MemRefType sourceType = source.getType().dyn_cast<MemRefType>(); in matchAndRewrite() 448 MemRefType collapsedSourceType = in matchAndRewrite() 481 MemRefType sourceType = source.getType().dyn_cast<MemRefType>(); in matchAndRewrite() 506 MemRefType collapsedSourceType = in matchAndRewrite() 534 if (read.getShapedType().isa<MemRefType>()) in transferOpflowOpt() [all …]
|
| H A D | VectorTransferSplitRewritePatterns.cpp | 155 static MemRefType getCastCompatibleMemRefType(MemRefType aT, MemRefType bT) { in getCastCompatibleMemRefType() 159 return MemRefType(); in getCastCompatibleMemRefType() 165 return MemRefType(); in getCastCompatibleMemRefType() 180 return MemRefType::get( in getCastCompatibleMemRefType() 194 assert(memrefRank == alloc.getType().cast<MemRefType>().getRank() && in createSubViewIntersection() 249 MemRefType compatibleMemRefType, Value alloc) { in createFullPartialLinalgCopy() 303 Value inBoundsCond, MemRefType compatibleMemRefType, Value alloc) { in createFullPartialVectorTransferRead() 325 loc, MemRefType::get({}, vector.getType()), alloc)); in createFullPartialVectorTransferRead() 354 MemRefType compatibleMemRefType, Value alloc) { in getLocationToWriteFullVec() 571 MemRefType compatibleMemRefType = in splitFullAndPartialTransfer() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Affine/IR/ |
| H A D | AffineOps.h | 109 MemRefType getSrcMemRefType() { in getSrcMemRefType() 110 return getSrcMemRef().getType().cast<MemRefType>(); in getSrcMemRefType() 141 MemRefType getDstMemRefType() { in getDstMemRefType() 142 return getDstMemRef().getType().cast<MemRefType>(); in getDstMemRefType() 147 return getDstMemRef().getType().cast<MemRefType>().getRank(); in getDstMemRefRank() 175 MemRefType getTagMemRefType() { in getTagMemRefType() 176 return getTagMemRef().getType().cast<MemRefType>(); in getTagMemRefType() 181 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank() 298 MemRefType getTagMemRefType() { in getTagMemRefType() 299 return getTagMemRef().getType().cast<MemRefType>(); in getTagMemRefType() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/ |
| H A D | BufferResultsToOutParams.cpp | 19 static bool hasFullyDynamicLayoutMap(MemRefType type) { in hasFullyDynamicLayoutMap() 33 static bool hasStaticIdentityLayout(MemRefType type) { in hasStaticIdentityLayout() 49 if (auto memrefType = resultType.value().dyn_cast<MemRefType>()) { in updateFuncOp() 99 if (operand.getType().isa<MemRefType>()) in updateReturnOps() 121 if (result.getType().isa<MemRefType>()) in updateCalls() 129 if (!memref.getType().cast<MemRefType>().hasStaticShape()) { in updateCalls() 135 auto memrefType = memref.getType().cast<MemRefType>(); in updateCalls() 137 MemRefType::get(memrefType.getShape(), memrefType.getElementType(), in updateCalls()
|
| /llvm-project-15.0.7/mlir/include/mlir/Conversion/LLVMCommon/ |
| H A D | Pattern.h | 71 Value getStridedElementPtr(Location loc, MemRefType type, Value memRefDesc, 77 bool isConvertibleAndHasIdentityMaps(MemRefType type) const; 80 Type getElementPtrType(MemRefType type) const; 97 void getMemRefDescriptorSizes(Location loc, MemRefType memRefType, 114 createMemRefDescriptor(Location loc, MemRefType memRefType,
|
| H A D | MemRefBuilder.h | 23 class MemRefType; variable 45 MemRefType type, Value memory); 97 LLVMTypeConverter &converter, MemRefType type, 103 MemRefType type, SmallVectorImpl<Value> &results); 107 static unsigned getNumUnpackedValues(MemRefType type);
|
| /llvm-project-15.0.7/mlir/lib/Dialect/GPU/Transforms/ |
| H A D | MemoryPromotion.cpp | 33 auto memRefType = from.getType().cast<MemRefType>(); in insertCopyLoops() 124 auto fromType = from.getType().cast<MemRefType>(); in insertCopies() 125 auto toType = to.getType().cast<MemRefType>(); in insertCopies() 146 auto type = value.getType().dyn_cast<MemRefType>(); in promoteToWorkgroupMemory() 151 auto bufferType = MemRefType::get(type.getShape(), type.getElementType(), {}, in promoteToWorkgroupMemory()
|
| /llvm-project-15.0.7/mlir/test/lib/Analysis/ |
| H A D | TestMemRefStrideCalculation.cpp | 35 auto memrefType = allocOp.getResult().getType().cast<MemRefType>(); in runOnOperation() 44 if (offset == MemRefType::getDynamicStrideOrOffset()) in runOnOperation() 50 if (v == MemRefType::getDynamicStrideOrOffset()) in runOnOperation()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/LLVMCommon/ |
| H A D | TypeConverter.cpp | 36 addConversion([&](MemRefType type) { return convertMemRefType(type); }); in LLVMTypeConverter() 132 addArgumentMaterialization([&](OpBuilder &builder, MemRefType resultType, in LLVMTypeConverter() 262 if (t.isa<MemRefType, UnrankedMemRefType>()) in convertFunctionTypeCWrapper() 299 LLVMTypeConverter::getMemRefDescriptorFields(MemRefType type, in getMemRefDescriptorFields() 323 unsigned LLVMTypeConverter::getMemRefDescriptorSize(MemRefType type, in getMemRefDescriptorSize() 333 Type LLVMTypeConverter::convertMemRefType(MemRefType type) { in convertMemRefType() 379 auto memrefTy = type.cast<MemRefType>(); in canConvertToBarePtr() 448 if (auto memrefTy = stdTypes[i].dyn_cast<MemRefType>()) in promoteBarePtrsToDescriptors() 505 if (auto memrefType = operand.getType().dyn_cast<MemRefType>()) { in promoteOperands() 517 if (auto memrefType = operand.getType().dyn_cast<MemRefType>()) { in promoteOperands() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToLLVM/ |
| H A D | MemRefToLLVM.cpp | 358 if (operandType.isa<MemRefType>()) { in matchAndRewrite() 427 MemRefType memRefType = operandType.cast<MemRefType>(); in extractSizeOfRankedMemRef() 603 MemRefType type = global.getType(); in matchAndRewrite() 654 MemRefType type = getGlobalOp.getResult().getType().cast<MemRefType>(); in allocateBuffer() 788 if (srcType.isa<MemRefType>() && dstType.isa<MemRefType>()) in match() 811 if (srcType.isa<MemRefType>() && dstType.isa<MemRefType>()) in rewrite() 1004 if (operandType.isa<MemRefType>()) { in extractPointersAndOffset() 1058 MemRefType targetMemRefType = in convertSourceMemRefToDescriptor() 1127 MemRefType targetMemRefType = in convertSourceMemRefToDescriptor() 1556 TypeConverter *typeConverter, MemRefType srcType, MemRefType dstType, in fillInDynamicStridesForMemDescriptor() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/MemRef/IR/ |
| H A D | MemRefOps.td | 99 MemRefType getType() { return getResult().getType().cast<MemRefType>(); } 750 MemRefType getMemRefType() { 932 MemRefType getMemRefType() { 973 MemRefType getMemRefType() { 1056 MemRefType getType() { return getResult().getType().cast<MemRefType>(); } 1156 MemRefType getType() { return getResult().getType().cast<MemRefType>(); } 1191 MemRefType getSrcType() { return getSrc().getType().cast<MemRefType>(); } 1193 MemRefType getResultType() { return getResult().getType().cast<MemRefType>(); } 1630 MemRefType getSourceType() { 1635 MemRefType getType() { return getResult().getType().cast<MemRefType>(); } [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/IR/ |
| H A D | BufferizationOps.cpp | 28 MemRefType destType) { in castOrReallocMemRefValue() 29 auto srcType = value.getType().cast<MemRefType>(); in castOrReallocMemRefValue() 42 auto isGuaranteedCastCompatible = [](MemRefType source, MemRefType target) { in castOrReallocMemRefValue() 49 return a == MemRefType::getDynamicStrideOrOffset() && in castOrReallocMemRefValue() 50 b != MemRefType::getDynamicStrideOrOffset(); in castOrReallocMemRefValue() 103 auto rankedSrcType = srcType.dyn_cast<MemRefType>(); in foldToMemrefToTensorPair() 104 auto rankedDestType = destType.dyn_cast<MemRefType>(); in foldToMemrefToTensorPair() 138 if (shapedType.isa<MemRefType>()) { in populateDynamicDimSizes() 188 MemRefType::get(getType().getShape(), getType().getElementType(), in bufferize() 591 auto memrefType = MemRefType::get(srcTensorType.getShape(), in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/CAPI/IR/ |
| H A D | BuiltinTypes.cpp | 233 bool mlirTypeIsAMemRef(MlirType type) { return unwrap(type).isa<MemRefType>(); } in mlirTypeIsAMemRef() 238 return wrap(MemRefType::get( in mlirMemRefTypeGet() 250 return wrap(MemRefType::getChecked( in mlirMemRefTypeGetChecked() 262 return wrap(MemRefType::get( in mlirMemRefTypeContiguousGet() 271 return wrap(MemRefType::getChecked( in mlirMemRefTypeContiguousGetChecked() 277 return wrap(unwrap(type).cast<MemRefType>().getLayout()); in mlirMemRefTypeGetLayout() 281 return wrap(unwrap(type).cast<MemRefType>().getLayout().getAffineMap()); in mlirMemRefTypeGetAffineMap() 285 return wrap(unwrap(type).cast<MemRefType>().getMemorySpace()); in mlirMemRefTypeGetMemorySpace()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/BufferizationToMemRef/ |
| H A D | BufferizationToMemRef.cpp | 42 MemRefType memrefType = type.cast<MemRefType>(); in matchAndRewrite() 45 MemRefType::get(memrefType.getShape(), memrefType.getElementType(), in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/NVGPU/IR/ |
| H A D | NVGPUDialect.cpp | 59 static bool isLastMemrefDimUnitStride(MemRefType type) { in isLastMemrefDimUnitStride() 69 auto srcMemref = getSrc().getType().cast<MemRefType>(); in verify() 70 auto dstMemref = getDst().getType().cast<MemRefType>(); in verify() 199 auto srcMemref = getSrcMemref().getType().cast<MemRefType>(); in verify()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToSPIRV/ |
| H A D | MemRefToSPIRV.cpp | 91 static bool isAllocationSupported(Operation *allocOp, MemRefType type) { in isAllocationSupported() 118 static Optional<spirv::Scope> getAtomicOpScope(MemRefType type) { in getAtomicOpScope() 248 MemRefType allocType = allocaOp.getType(); in matchAndRewrite() 267 MemRefType allocType = operation.getType(); in matchAndRewrite() 306 MemRefType deallocType = operation.getMemref().getType().cast<MemRefType>(); in matchAndRewrite() 321 auto memrefType = loadOp.getMemref().getType().cast<MemRefType>(); in matchAndRewrite() 416 auto memrefType = loadOp.getMemref().getType().cast<MemRefType>(); in matchAndRewrite() 433 auto memrefType = storeOp.getMemref().getType().cast<MemRefType>(); in matchAndRewrite() 528 auto memrefType = storeOp.getMemref().getType().cast<MemRefType>(); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/LinalgToSPIRV/ |
| H A D | LinalgToSPIRV.cpp | 76 auto originalInputType = op->getOperand(0).getType().cast<MemRefType>(); in matchAsPerformingReduction() 77 auto originalOutputType = op->getOperand(1).getType().cast<MemRefType>(); in matchAsPerformingReduction() 113 auto originalInputType = op->getOperand(0).getType().cast<MemRefType>(); in matchAndRewrite() 114 auto originalOutputType = op->getOperand(1).getType().cast<MemRefType>(); in matchAndRewrite()
|