Home
last modified time | relevance | path

Searched refs:MemRefType (Results 1 – 25 of 112) sorted by relevance

12345

/external/llvm-project/mlir/test/Dialect/Affine/
Dmemref-stride-calculation.mlir6 // 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
21 // CHECK: MemRefType offset: 0 strides: 20, 5, 1
23 // CHECK: MemRefType offset: 0 strides: ?, ?, 1
25 // CHECK: MemRefType offset: 0 strides: ?, 5, 1
[all …]
/external/llvm-project/mlir/lib/Transforms/
DNormalizeMemRefs.cpp169 if (oldMemRef.getType().isa<MemRefType>()) in areMemRefsNormalizable()
180 if (oldMemRef.getType().isa<MemRefType>()) in areMemRefsNormalizable()
213 MemRefType memrefType = opType.dyn_cast<MemRefType>(); in updateFunctionSignature()
272 oldResult.getType().dyn_cast<MemRefType>().getAffineMaps().front(); in updateFunctionSignature()
344 MemRefType memrefType = argType.dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs()
353 MemRefType newMemRefType = normalizeMemRefType(memrefType, b, in normalizeFuncOpMemRefs()
407 MemRefType oldMemRefType = oldMemRef.getType().dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs()
411 MemRefType newMemRefType = newMemRef.getType().cast<MemRefType>(); in normalizeFuncOpMemRefs()
451 MemRefType memrefType = resType.dyn_cast<MemRefType>(); in normalizeFuncOpMemRefs()
460 MemRefType newMemRefType = normalizeMemRefType(memrefType, b, in normalizeFuncOpMemRefs()
[all …]
/external/llvm-project/mlir/include/mlir/Dialect/Affine/IR/
DAffineOps.h100 MemRefType getSrcMemRefType() { in getSrcMemRefType()
101 return getSrcMemRef().getType().cast<MemRefType>(); in getSrcMemRefType()
122 return getSrcMemRef().getType().cast<MemRefType>().getMemorySpace(); in getSrcMemorySpace()
132 MemRefType getDstMemRefType() { in getDstMemRefType()
133 return getDstMemRef().getType().cast<MemRefType>(); in getDstMemRefType()
138 return getDstMemRef().getType().cast<MemRefType>().getRank(); in getDstMemRefRank()
143 return getDstMemRef().getType().cast<MemRefType>().getMemorySpace(); in getDstMemorySpace()
166 MemRefType getTagMemRefType() { in getTagMemRefType()
167 return getTagMemRef().getType().cast<MemRefType>(); in getTagMemRefType()
172 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank()
[all …]
DAffineMemoryOpInterfaces.td38 /*retTy=*/"MemRefType",
44 return op.getMemRef().getType().template cast<MemRefType>();
117 /*retTy=*/"MemRefType",
123 return op.getMemRef().getType().template cast<MemRefType>();
/external/llvm-project/mlir/lib/IR/
DBuiltinTypes.cpp264 return cast<MemRefType>().getShape(); in getShape()
395 MemRefType MemRefType::get(ArrayRef<int64_t> shape, Type elementType, in get()
410 MemRefType MemRefType::getChecked(ArrayRef<int64_t> shape, Type elementType, in getChecked()
421 MemRefType MemRefType::getImpl(ArrayRef<int64_t> shape, Type elementType, in getImpl()
429 MemRefType(); in getImpl()
434 return emitOptionalError(location, "invalid memref size"), MemRefType(); in getImpl()
471 ArrayRef<int64_t> MemRefType::getShape() const { return getImpl()->getShape(); } in getShape()
473 ArrayRef<AffineMap> MemRefType::getAffineMaps() const { in getAffineMaps()
561 LogicalResult mlir::getStridesAndOffset(MemRefType t, in getStridesAndOffset()
630 LogicalResult mlir::getStridesAndOffset(MemRefType t, in getStridesAndOffset()
[all …]
/external/llvm-project/mlir/include/mlir/IR/
DBuiltinTypes.h543 class MemRefType : public Type::TypeBase<MemRefType, BaseMemRefType,
551 explicit Builder(MemRefType other) in Builder()
581 operator MemRefType() { in MemRefType() function
582 return MemRefType::get(shape, elementType, affineMaps, memorySpace); in MemRefType()
598 static MemRefType get(ArrayRef<int64_t> shape, Type elementType,
608 static MemRefType getChecked(ArrayRef<int64_t> shape, Type elementType,
629 static MemRefType getImpl(ArrayRef<int64_t> shape, Type elementType,
715 return type.isa<MemRefType, UnrankedMemRefType>(); in classof()
724 UnrankedMemRefType, MemRefType>(); in classof()
756 LogicalResult getStridesAndOffset(MemRefType t,
[all …]
/external/llvm-project/mlir/lib/Transforms/Utils/
DUtils.cpp52 unsigned newMemRefRank = newMemRef.getType().cast<MemRefType>().getRank(); in replaceAllMemRefUsesWith()
54 unsigned oldMemRefRank = oldMemRef.getType().cast<MemRefType>().getRank(); in replaceAllMemRefUsesWith()
67 assert(oldMemRef.getType().cast<MemRefType>().getElementType() == in replaceAllMemRefUsesWith()
68 newMemRef.getType().cast<MemRefType>().getElementType()); in replaceAllMemRefUsesWith()
226 unsigned newMemRefRank = newMemRef.getType().cast<MemRefType>().getRank(); in replaceAllMemRefUsesWith()
228 unsigned oldMemRefRank = oldMemRef.getType().cast<MemRefType>().getRank(); in replaceAllMemRefUsesWith()
241 assert(oldMemRef.getType().cast<MemRefType>().getElementType() == in replaceAllMemRefUsesWith()
242 newMemRef.getType().cast<MemRefType>().getElementType()); in replaceAllMemRefUsesWith()
397 MemRefType memrefType = allocOp.getType(); in normalizeMemRef()
402 MemRefType newMemRefType = in normalizeMemRef()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlhlo_legalize_to_affine.cc50 MemRefType lhs_type = lhs.getType().cast<MemRefType>(); in matchAndRewrite()
51 MemRefType rhs_type = rhs.getType().cast<MemRefType>(); in matchAndRewrite()
109 const auto& lhs_type = lhs.getType().template cast<MemRefType>(); in matchAndRewrite()
110 const auto& rhs_type = rhs.getType().template cast<MemRefType>(); in matchAndRewrite()
Dhlo_legalize_to_lhlo.cc58 MemRefType::get(result_type.getShape(), result_type.getElementType()); in InsertDynamicAllocAndDealloc()
85 MemRefType::get(result_type.getShape(), result_type.getElementType()); in InsertAlloc()
212 MemRefType::get(result_type.getShape(), result_type.getElementType())); in matchAndRewrite()
230 MemRefType::get(ranked_type.getShape(), ranked_type.getElementType()); in matchAndRewrite()
279 auto operand_type = operand.getType().cast<MemRefType>(); in InsertDynamicMemrefCastOp()
350 MemRefType::kDynamicStrideOrOffset); in InsertDynamicMemrefCastOp()
352 MemRefType::kDynamicSize); in InsertDynamicMemrefCastOp()
353 auto type_erased_memref_type = MemRefType::get( in InsertDynamicMemrefCastOp()
439 MemRefType::get(old_type.getShape(), old_type.getElementType()); in matchAndRewrite()
444 sig_conversion.addInputs({MemRefType::get(result_type.getShape(), in matchAndRewrite()
/external/llvm-project/mlir/include/mlir/Dialect/StandardOps/IR/
DOps.h164 return getSrcMemRef().getType().cast<MemRefType>().getRank(); in getSrcMemRefRank()
176 return getDstMemRef().getType().cast<MemRefType>().getRank(); in getDstMemRefRank()
179 return getSrcMemRef().getType().cast<MemRefType>().getMemorySpace(); in getSrcMemorySpace()
182 return getDstMemRef().getType().cast<MemRefType>().getMemorySpace(); in getDstMemorySpace()
203 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank()
293 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank()
/external/llvm-project/mlir/test/lib/Transforms/
DTestMemRefStrideCalculation.cpp27 auto memrefType = allocOp.getResult().getType().cast<MemRefType>(); in runOnFunction()
36 if (offset == MemRefType::getDynamicStrideOrOffset()) in runOnFunction()
42 if (v == MemRefType::getDynamicStrideOrOffset()) in runOnFunction()
/external/tensorflow/tensorflow/compiler/mlir/xla/
Dtype_to_shape_test.cc30 using mlir::MemRefType;
102 TypeToShape(MemRefType::get({8, 128}, b.getF32Type())).ToProto(), in TEST()
106 TypeToShape(MemRefType::get({100, 13, 210}, b.getF32Type())).ToProto(), in TEST()
112 TypeToShape(MemRefType::get({100, 13, 210}, in TEST()
189 ConvertShapeToType<MemRefType>(shape, builder); in TEST()
206 ConvertShapeToType<MemRefType>(shape, builder); in TEST()
/external/llvm-project/mlir/include/mlir/Conversion/StandardToLLVM/
DConvertStandardToLLVM.h165 Type convertMemRefType(MemRefType type);
189 getMemRefDescriptorFields(MemRefType type, bool unpackAggregates);
275 MemRefType type, Value memory);
324 LLVMTypeConverter &converter, MemRefType type,
330 MemRefType type, SmallVectorImpl<Value> &results);
334 static unsigned getNumUnpackedValues(MemRefType type);
510 Value getStridedElementPtr(Location loc, MemRefType type, Value memRefDesc,
515 Value getDataPtr(Location loc, MemRefType type, Value memRefDesc,
520 bool isSupportedMemRefType(MemRefType type) const;
523 Type getElementPtrType(MemRefType type) const;
[all …]
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DBufferize.cpp31 auto memrefType = memref.getType().cast<MemRefType>(); in cloneMemref()
62 auto memrefType = MemRefType::get(tensorShape, tensorType.getElementType()); in allocateBuffersForResults()
135 newBlock->addArgument(v.getType().cast<MemRefType>().getElementType()); in finalizeBufferAllocationForGenericOp()
255 assert(sourceMemref.getType().isa<MemRefType>()); in matchAndRewrite()
257 MemRefType subviewMemRefType = in matchAndRewrite()
258 getTypeConverter()->convertType(op.getType()).cast<MemRefType>(); in matchAndRewrite()
297 assert(sourceMemRef.getType().isa<MemRefType>()); in matchAndRewrite()
303 assert(destMemRef.getType().isa<MemRefType>()); in matchAndRewrite()
/external/llvm-project/mlir/lib/Dialect/StandardOps/IR/
DOps.cpp222 if (auto memref = type.dyn_cast<MemRefType>()) in getTensorTypeFromMemRefType()
267 auto memRefType = op.getResult().getType().template dyn_cast<MemRefType>(); in verifyAllocLikeOp()
341 MemRefType newMemRefType = in matchAndRewrite()
342 MemRefType::Builder(memrefType).setShape(newShapeConstants); in matchAndRewrite()
485 if (auto memrefType = memref.getType().dyn_cast<MemRefType>()) { in build()
534 result.types.push_back(memrefType.cast<MemRefType>().getElementType()); in parseGenericAtomicRMWOp()
1308 if (!op.memref().getType().isa<MemRefType>()) in verify()
1358 } else if (auto memrefType = type.dyn_cast<MemRefType>()) { in verify()
1417 auto memrefType = argTy.dyn_cast<MemRefType>(); in fold()
1582 if (!getSrcMemRef().getType().isa<MemRefType>()) in verify()
[all …]
/external/llvm-project/mlir/lib/Dialect/GPU/Transforms/
DMemoryPromotion.cpp135 auto fromType = from.getType().cast<MemRefType>(); in insertCopies()
136 auto toType = to.getType().cast<MemRefType>(); in insertCopies()
161 auto type = value.getType().dyn_cast<MemRefType>(); in promoteToWorkgroupMemory()
166 auto bufferType = MemRefType::get(type.getShape(), type.getElementType(), {}, in promoteToWorkgroupMemory()
/external/llvm-project/mlir/lib/CAPI/IR/
DBuiltinTypes.cpp221 bool mlirTypeIsAMemRef(MlirType type) { return unwrap(type).isa<MemRefType>(); } in mlirTypeIsAMemRef()
230 MemRefType::get(llvm::makeArrayRef(shape, static_cast<size_t>(rank)), in mlirMemRefTypeGet()
238 MemRefType::get(llvm::makeArrayRef(shape, static_cast<size_t>(rank)), in mlirMemRefTypeContiguousGet()
246 return wrap(MemRefType::getChecked( in mlirMemRefTypeContiguousGetChecked()
253 unwrap(type).cast<MemRefType>().getAffineMaps().size()); in mlirMemRefTypeGetNumAffineMaps()
257 return wrap(unwrap(type).cast<MemRefType>().getAffineMaps()[pos]); in mlirMemRefTypeGetAffineMap()
261 return unwrap(type).cast<MemRefType>().getMemorySpace(); in mlirMemRefTypeGetMemorySpace()
/external/llvm-project/mlir/lib/Conversion/LinalgToSPIRV/
DLinalgToSPIRV.cpp77 auto originalInputType = op->getOperand(0).getType().cast<MemRefType>(); in matchAsPerformingReduction()
78 auto originalOutputType = op->getOperand(1).getType().cast<MemRefType>(); in matchAsPerformingReduction()
115 auto originalInputType = op->getOperand(0).getType().cast<MemRefType>(); in matchAndRewrite()
116 auto originalOutputType = op->getOperand(1).getType().cast<MemRefType>(); in matchAndRewrite()
/external/llvm-project/mlir/lib/Conversion/StandardToLLVM/
DStandardToLLVM.cpp62 if (auto memref = type.dyn_cast<MemRefType>()) { in structFuncArgTypeConverter()
118 addConversion([&](MemRefType type) { return convertMemRefType(type); }); in LLVMTypeConverter()
137 addArgumentMaterialization([&](OpBuilder &builder, MemRefType resultType, in LLVMTypeConverter()
269 if (t.isa<MemRefType, UnrankedMemRefType>()) in convertFunctionTypeCWrapper()
319 LLVMTypeConverter::getMemRefDescriptorFields(MemRefType type, in getMemRefDescriptorFields()
344 Type LLVMTypeConverter::convertMemRefType(MemRefType type) { in convertMemRefType()
380 auto memrefTy = type.cast<MemRefType>(); in convertMemRefToBarePtr()
440 if (auto memrefTy = stdTypes[i].dyn_cast<MemRefType>()) in promoteBarePtrsToDescriptors()
529 MemRefType type, Value memory) { in fromStaticShape()
538 assert(offset != MemRefType::getDynamicStrideOrOffset() && in fromStaticShape()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/transforms/
Dbuffer_reuse_pass.cc75 auto a_ty = a.getType().dyn_cast<MemRefType>(); in build()
76 auto b_ty = b.getType().dyn_cast<MemRefType>(); in build()
95 auto a_ty = a.getType().dyn_cast<MemRefType>(); in build()
96 auto b_ty = b.getType().dyn_cast<MemRefType>(); in build()
289 auto old_buffer_ty = old_buffer.getType().dyn_cast<MemRefType>(); in can_reuse_locally()
290 auto new_buffer_ty = old_buffer.getType().dyn_cast<MemRefType>(); in can_reuse_locally()
/external/llvm-project/mlir/test/EDSC/
Dbuilder-api-test.cpp316 MemRefType::get({ShapedType::kDynamicSize, ShapedType::kDynamicSize, in TEST_FUNC()
395 auto memrefType = MemRefType::get({}, i1Type, {}, 0); in TEST_FUNC()
540 auto memrefType = MemRefType::get( in TEST_FUNC()
615 auto memrefType = MemRefType::get( in TEST_FUNC()
723 MemRefType::get({ShapedType::kDynamicSize, ShapedType::kDynamicSize, in TEST_FUNC()
797 auto memrefType = MemRefType::get({ShapedType::kDynamicSize}, in TEST_FUNC()
832 MemRefType::get({}, FloatType::getF32(&globalContext()), {}, 0); in TEST_FUNC()
867 auto memrefType = MemRefType::get( in TEST_FUNC()
920 auto memrefType = MemRefType::get( in TEST_FUNC()
957 auto memrefType = MemRefType::get( in TEST_FUNC()
[all …]
/external/llvm-project/mlir/include/mlir/Transforms/
DUtils.h98 MemRefType normalizeMemRefType(MemRefType memrefType, OpBuilder builder,
/external/llvm-project/mlir/lib/Dialect/StandardOps/EDSC/
DBuilders.cpp18 MemRefType memRefType = memRef.getType().cast<MemRefType>(); in getMemRefSizes()
/external/llvm-project/mlir/include/mlir/Dialect/Vector/
DVectorUtils.h23 class MemRefType; variable
160 AffineMap getTransferMinorIdentityMap(MemRefType memRefType,
/external/llvm-project/mlir/include/mlir/EDSC/
DBuilders.h143 assert((v.getType().isa<MemRefType, RankedTensorType, VectorType>()) && in StructuredIndexed()
148 assert((t.isa<MemRefType, RankedTensorType, VectorType>()) && in StructuredIndexed()
211 MemRefType getMemRefType() const { in getMemRefType()
212 return value.getType().template cast<MemRefType>(); in getMemRefType()
219 .template cast<MemRefType>() in getElementalTypeAs()

12345