Home
last modified time | relevance | path

Searched refs:getShape (Results 1 – 25 of 150) sorted by relevance

123456

/llvm-project-15.0.7/mlir/unittests/Interfaces/
H A DInferTypeOpInterfaceTest.cpp62 EXPECT_EQ(range.getShape(1).getRank(), 1); in TEST_F()
63 EXPECT_EQ(range.getShape(1).getDimSize(0), 1); in TEST_F()
96 ASSERT_TRUE(range.getShape(0)); in TEST_F()
97 EXPECT_EQ(range.getShape(0).getRank(), 2); in TEST_F()
98 EXPECT_EQ(range.getShape(0).getDimSize(0), 10); in TEST_F()
99 EXPECT_EQ(range.getShape(0).getDimSize(1), 20); in TEST_F()
100 ASSERT_TRUE(range.getShape(1)); in TEST_F()
101 EXPECT_EQ(range.getShape(1).getRank(), 1); in TEST_F()
102 EXPECT_EQ(range.getShape(1).getDimSize(0), 1); in TEST_F()
103 EXPECT_FALSE(range.getShape(2)); in TEST_F()
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/IR/
H A DTosaOps.cpp346 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
428 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
430 ShapeAdaptor biasShape = operands.getShape(2); in inferReturnTypeComponents()
460 ShapeAdaptor lhsShape = operands.getShape(0); in inferReturnTypeComponents()
461 ShapeAdaptor rhsShape = operands.getShape(1); in inferReturnTypeComponents()
487 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
558 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
576 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
609 ShapeAdaptor inputShape = operands.getShape(0); in inferReturnTypeComponents()
877 auto shape = operands.getShape(i); in REDUCE_SHAPE_INFER()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/
H A DTraits.cpp117 static ArrayRef<int64_t> getShape(Type type) { in getShape() function
119 return sType.getShape(); in getShape()
176 if (!getBroadcastedShape(getShape(type1), getShape(type2), resultShape)) in getBroadcastedType()
253 (void)util::getBroadcastedShape(getShape(*rankedOperands.begin()), {}, in verifyCompatibleOperandBroadcast()
257 if (!util::getBroadcastedShape(temp, getShape(other), resultShape)) in verifyCompatibleOperandBroadcast()
270 getShape(type).take_back(resultShape.size()); in verifyCompatibleOperandBroadcast()
273 << "result type " << getShapeString(getShape(type)) in verifyCompatibleOperandBroadcast()
/llvm-project-15.0.7/mlir/unittests/Dialect/Quant/
H A DQuantizationUtilsTest.cpp111 EXPECT_EQ(tensorType.getShape(), expectedTensorType.getShape()); in TEST()
137 EXPECT_EQ(tensorType.getShape(), expectedTensorType.getShape()); in TEST()
162 EXPECT_EQ(tensorType.getShape(), expectedTensorType.getShape()); in TEST()
/llvm-project-15.0.7/mlir/lib/Dialect/Quant/IR/
H A DQuantTypes.cpp111 candidateType.cast<RankedTensorType>().getShape(), getStorageType()); in castFromStorageType()
119 return VectorType::get(candidateType.cast<VectorType>().getShape(), in castFromStorageType()
140 return RankedTensorType::get(sType.getShape(), storageType); in castToStorageType()
146 return VectorType::get(sType.getShape(), storageType); in castToStorageType()
166 return RankedTensorType::get(candidateShapedType.getShape(), *this); in castFromExpressedType()
174 return VectorType::get(candidateShapedType.getShape(), *this); in castFromExpressedType()
195 return RankedTensorType::get(sType.getShape(), expressedType); in castToExpressedType()
201 return VectorType::get(sType.getShape(), expressedType); in castToExpressedType()
/llvm-project-15.0.7/mlir/lib/IR/
H A DBuiltinTypes.cpp268 return get(getShape(), replTypes.front(), getNumScalableDims()); in replaceImmediateSubElements()
273 return VectorType::get(shape.value_or(getShape()), elementType, in cloneWith()
289 ArrayRef<int64_t> TensorType::getShape() const { in getShape() function in TensorType
290 return cast<RankedTensorType>().getShape(); in getShape()
355 return get(getShape(), replTypes.front(), in replaceImmediateSubElements()
392 ArrayRef<int64_t> BaseMemRefType::getShape() const { in getShape() function in BaseMemRefType
393 return cast<MemRefType>().getShape(); in getShape()
476 candidateReducedShapedType.getShape(); in isRankReducedType()
692 return get(getShape(), replTypes[0], in replaceImmediateSubElements()
971 if (t.getShape().empty()) in canonicalizeStridedLayout()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Utils/
H A DReshapeOpsUtils.h119 if (llvm::any_of(expandedType.getShape(), in verifyReshapeLikeTypes()
161 collapsedType.getShape(), expandedType.getShape(), in verifyReshapeLikeShapes()
312 srcReassociation, resultReassociation, srcType.getShape(), in matchAndRewrite()
313 resultType.getShape()); in matchAndRewrite()
323 resultType.getShape(), srcType.getShape()); in matchAndRewrite()
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DBuiltinTypeInterfaces.td83 "::llvm::ArrayRef<int64_t>", "getShape">,
138 return $_type.getShape().size();
144 return ::mlir::ShapedType::getNumElements($_type.getShape());
151 return ::mlir::ShapedType::isDynamic($_type.getShape()[idx]);
158 llvm::none_of($_type.getShape(), ::mlir::ShapedType::isDynamic);
164 return hasStaticShape() && $_type.getShape() == shape;
170 return llvm::count_if($_type.getShape(), ::mlir::ShapedType::isDynamic);
177 return $_type.getShape()[idx];
185 return llvm::count_if($_type.getShape().take_front(index),
H A DBuiltinTypes.h88 ArrayRef<int64_t> getShape() const;
124 ArrayRef<int64_t> getShape() const;
169 : shape(other.getShape()), elementType(other.getElementType()), in Builder()
220 : shape(other.getShape()), elementType(other.getElementType()), in Builder()
284 : shape(other.getShape()), elementType(other.getElementType()), in Builder()
/llvm-project-15.0.7/mlir/examples/toy/Ch3/mlir/
H A DDialect.cpp151 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verify()
154 << dim << ": " << attrType.getShape()[dim] in verify()
155 << " != " << resultType.getShape()[dim]; in verify()
294 auto inputShape = inputType.getShape(); in verify()
296 resultType.getShape().rbegin())) { in verify()
/llvm-project-15.0.7/mlir/examples/toy/Ch2/mlir/
H A DDialect.cpp151 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verify()
154 << dim << ": " << attrType.getShape()[dim] in verify()
155 << " != " << resultType.getShape()[dim]; in verify()
294 auto inputShape = inputType.getShape(); in verify()
296 resultType.getShape().rbegin())) { in verify()
/llvm-project-15.0.7/mlir/examples/toy/Ch6/mlir/
H A DDialect.cpp213 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verify()
216 << dim << ": " << attrType.getShape()[dim] in verify()
217 << " != " << resultType.getShape()[dim]; in verify()
402 SmallVector<int64_t, 2> dims(llvm::reverse(arrayTy.getShape())); in inferShapes()
412 auto inputShape = inputType.getShape(); in verify()
414 resultType.getShape().rbegin())) { in verify()
/llvm-project-15.0.7/mlir/examples/toy/Ch4/mlir/
H A DDialect.cpp213 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verify()
216 << dim << ": " << attrType.getShape()[dim] in verify()
217 << " != " << resultType.getShape()[dim]; in verify()
402 SmallVector<int64_t, 2> dims(llvm::reverse(arrayTy.getShape())); in inferShapes()
412 auto inputShape = inputType.getShape(); in verify()
414 resultType.getShape().rbegin())) { in verify()
/llvm-project-15.0.7/mlir/examples/toy/Ch5/mlir/
H A DDialect.cpp213 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verify()
216 << dim << ": " << attrType.getShape()[dim] in verify()
217 << " != " << resultType.getShape()[dim]; in verify()
402 SmallVector<int64_t, 2> dims(llvm::reverse(arrayTy.getShape())); in inferShapes()
412 auto inputShape = inputType.getShape(); in verify()
414 resultType.getShape().rbegin())) { in verify()
/llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/
H A DUniformSupport.cpp38 return RankedTensorType::get(tensorType.getShape(), elementalType); in convert()
42 return VectorType::get(vectorType.getShape(), elementalType); in convert()
78 auto shape = type.getShape(); in convert()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/GPU/IR/
H A DGPUDialect.h58 return key == KeyTy(getShape(), elementType, operand);
72 ArrayRef<int64_t> getShape() const { in getShape() function
151 ArrayRef<int64_t> getShape() const;
/llvm-project-15.0.7/mlir/lib/Dialect/NVGPU/IR/
H A DNVGPUDialect.cpp118 ArrayRef<int64_t> aShape = aVector.getShape(); in verify()
119 ArrayRef<int64_t> bShape = bVector.getShape(); in verify()
120 ArrayRef<int64_t> cShape = cVector.getShape(); in verify()
205 ArrayRef<int64_t> resShape = resVector.getShape(); in verify()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/ArmNeon/
H A DArmNeon.td103 "VectorType::get({$_self.cast<VectorType>().getShape()[0] / 4},"
136 CPred<"getA().getType().cast<VectorType>().getShape().size() == 1">
140 CPred<"getB().getType().cast<VectorType>().getShape().size() == 2">
144 CPred<"getB().getType().cast<VectorType>().getShape()[1] == 4">
148 …CPred<"getB().getType().cast<VectorType>().getShape()[0] == getA().getType().cast<VectorType>().ge…
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Transforms/
H A DTosaDecomposeDepthwise.cpp54 ArrayRef<int64_t> weightShape = weightType.getShape(); in matchAndRewrite()
60 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite()
98 auto outputShape = op.getOutput().getType().cast<ShapedType>().getShape(); in matchAndRewrite()
H A DTosaDecomposeConv2D.cpp35 llvm::count_if(inputType.getShape(), ShapedType::isDynamic); in matchAndRewrite()
49 ArrayRef<int64_t> weightShape = weightType.getShape(); in matchAndRewrite()
54 ArrayRef<int64_t> inputShape = inputType.getShape(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/IR/
H A DVectorOps.cpp786 if (lhsMaskType.getShape().size() != lhsType.getShape().size() || in verify()
787 rhsMaskType.getShape().size() != rhsType.getShape().size()) in verify()
834 auto lhsShape = getLhsType().getShape(); in getIterationBounds()
1333 extractVecType.getShape() != in foldExtractFromBroadcast()
2503 auto shape = type.getShape(); in verify()
2872 vectorType.getShape().back(); in verifyTransferOp()
3560 if (read.getVectorType().getShape() != rankedTensorType.getShape()) in foldReadInitWrite()
4337 if (!isValidShapeCast(srcType.getShape(), resultType.getShape())) in fold()
4340 if (!isValidShapeCast(resultType.getShape(), srcType.getShape())) in fold()
4507 res.append(vectorType.getShape().begin(), vectorType.getShape().end()); in extractShape()
[all …]
/llvm-project-15.0.7/mlir/lib/Interfaces/
H A DInferTypeOpInterface.cpp48 ArrayRef<int64_t> vals = t.cast<ShapedType>().getShape(); in getDims()
163 ShapeAdaptor ValueShapeRange::getShape(Value val) const { in getShape() function in ValueShapeRange
170 ShapeAdaptor ValueShapeRange::getShape(int index) const { in getShape() function in ValueShapeRange
173 return getShape(operator[](index)); in getShape()
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/
H A DVirtRegMap.h117 return getShape(virtReg).isValid(); in hasShape()
120 ShapeT getShape(Register virtReg) const { in getShape() function
156 Virt2ShapeMap[virtReg.id()] = getShape(SReg); in setIsSplitFromReg()
/llvm-project-15.0.7/mlir/lib/Dialect/GPU/Transforms/
H A DMemoryPromotion.cpp128 assert(fromType.getShape() == toType.getShape()); in insertCopies()
151 auto bufferType = MemRefType::get(type.getShape(), type.getElementType(), {}, in promoteToWorkgroupMemory()
/llvm-project-15.0.7/mlir/examples/toy/Ch7/mlir/
H A DDialect.cpp209 if (attrType.getShape()[dim] != resultType.getShape()[dim]) { in verifyConstantForType()
212 << dim << ": " << attrType.getShape()[dim] in verifyConstantForType()
213 << " != " << resultType.getShape()[dim]; in verifyConstantForType()
457 SmallVector<int64_t, 2> dims(llvm::reverse(arrayTy.getShape())); in inferShapes()
467 auto inputShape = inputType.getShape(); in verify()
469 resultType.getShape().rbegin())) { in verify()

123456