Home
last modified time | relevance | path

Searched refs:shapes (Results 1 – 25 of 73) sorted by relevance

123

/llvm-project-15.0.7/mlir/lib/Conversion/ShapeToStandard/
H A DShapeToStandard.td20 $_builder.getStringAttr("required broadcastable shapes")
23 def CstrBroadcastableToRequire : Pat<(Shape_CstrBroadcastableOp $shapes),
25 (Shape_IsBroadcastableOp $shapes),
29 $_builder.getStringAttr("required equal shapes")
32 def CstrEqToRequire : Pat<(Shape_CstrEqOp $shapes),
33 (Shape_CstrRequireOp (Shape_ShapeEqOp $shapes), (EqStringAttr))>;
/llvm-project-15.0.7/flang/include/flang/Lower/
H A DBoxAnalyzer.h104 llvm::SmallVectorImpl<int64_t> &&shapes) in LBoundsAndShape()
105 : lbounds{std::move(lbounds)}, shapes{std::move(shapes)} {} in LBoundsAndShape()
114 llvm::SmallVector<int64_t> shapes; member
121 llvm::SmallVectorImpl<int64_t> &&shapes) in StaticArray()
161 llvm::SmallVectorImpl<int64_t> &&shapes) in StaticArrayStaticChar()
175 llvm::SmallVectorImpl<int64_t> &&shapes) in StaticArrayDynamicChar()
387 llvm::SmallVector<int64_t> shapes; in analyze() local
399 shapes.push_back(extent < 0 ? 0 : extent); in analyze()
418 std::move(shapes)); in analyze()
426 std::move(shapes)); in analyze()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Shape/IR/
H A DShapeCanonicalization.td28 def CstrBroadcastableEqOps : Pat<(Shape_CstrBroadcastableOp:$op $shapes),
30 [(AllInputShapesEq $shapes)]>;
32 def CstrEqEqOps : Pat<(Shape_CstrEqOp:$op $shapes),
34 [(AllInputShapesEq $shapes)]>;
H A DShape.cpp509 shapes.emplace_back(cstr, std::move(shapesSet)); in matchAndRewrite()
513 llvm::sort(shapes, [](auto a, auto b) { in matchAndRewrite()
523 for (unsigned i = 0; i < shapes.size(); ++i) { in matchAndRewrite()
525 return llvm::set_is_subset(pair.second, shapes[i].second); in matchAndRewrite()
529 auto *it = std::remove_if(shapes.begin() + i + 1, shapes.end(), isSubset); in matchAndRewrite()
530 for (auto *it0 = it; it0 < shapes.end(); ++it0) in matchAndRewrite()
532 shapes.erase(it, shapes.end()); in matchAndRewrite()
541 for (auto &shape : shapes) in matchAndRewrite()
562 SmallVector<Value, 8> shapes; in matchAndRewrite() local
568 return llvm::is_contained(shapes, s); in matchAndRewrite()
[all …]
/llvm-project-15.0.7/mlir/lib/IR/
H A DTypeUtilities.cpp143 auto shapes = llvm::to_vector<8>(llvm::make_filter_range( in verifyCompatibleShapes() local
145 if (shapes.empty()) in verifyCompatibleShapes()
149 auto firstRank = shapes.front().getRank(); in verifyCompatibleShapes()
150 if (llvm::any_of(shapes, in verifyCompatibleShapes()
158 shapes, [&](auto shape) { return shape.getRank() >= i; }), in verifyCompatibleShapes()
/llvm-project-15.0.7/mlir/lib/Dialect/
H A DTraits.cpp25 ArrayRef<SmallVector<int64_t, 6>> shapes) { in staticallyKnownBroadcastable() argument
26 assert(!shapes.empty() && "Expected at least one shape"); in staticallyKnownBroadcastable()
27 size_t maxRank = shapes[0].size(); in staticallyKnownBroadcastable()
28 for (size_t i = 1; i != shapes.size(); ++i) in staticallyKnownBroadcastable()
29 maxRank = std::max(maxRank, shapes[i].size()); in staticallyKnownBroadcastable()
35 for (ArrayRef<int64_t> extent : shapes) { in staticallyKnownBroadcastable()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Tosa/Transforms/
H A DPasses.td27 def TosaInferShapes : Pass<"tosa-infer-shapes", "func::FuncOp"> {
28 let summary = "Propagate shapes across TOSA operations";
30 Pass that uses operand types and propagates shapes to TOSA operations.
31 This includes legalizing rankless and dynamic shapes towards static.
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Shape/IR/
H A DShapeOps.td88 let arguments = (ins Variadic<Shape_ShapeOrExtentTensorType>:$shapes,
95 $shapes attr-dict `:` type($shapes) `->` type($result)
202 as their equivalent non-error shapes. Error shapes can be tested for
216 let assemblyFormat = "$shapes attr-dict `:` type($shapes)";
285 let assemblyFormat = "$shapes attr-dict `:` type($shapes)";
758 let summary = "Concatenates two shapes";
786 let summary = "Return any combination of the input shapes";
913 let assemblyFormat = "$shapes attr-dict `:` type($shapes)";
926 let summary = "Determines if all input shapes are equal";
928 Given 1 or more input shapes, determine if all shapes are the exact same.
[all …]
/llvm-project-15.0.7/mlir/test/Conversion/ShapeToStandard/
H A Dconvert-shape-constraints.mlir9 // CHECK: cf.assert %[[BROADCAST_IS_VALID]], "required broadcastable shapes"
22 // CHECK: cf.assert %[[EQUAL_IS_VALID]], "required equal shapes"
/llvm-project-15.0.7/mlir/test/Dialect/
H A Dtraits.mlir71 // expected-error @+1 {{operands don't have broadcast-compatible shapes}}
81 … @+1 {{op result type '4x3x3' not broadcast compatible with broadcasted operands's shapes '4x3x2'}}
91 … {{op result type '8x7x6x1' not broadcast compatible with broadcasted operands's shapes '8x7x6x5'}}
141 …-error @+1 {{op result type '2' not broadcast compatible with broadcasted operands's shapes '3x2'}}
/llvm-project-15.0.7/mlir/docs/
H A DShapeInference.md58 runtime and compiler (for constructions of ops/refinement of shapes, reification
66 or bounded shapes at a later point). This allows for decoupling of these:
90 have shapes that are not known statically (for example, `tensor<16x?xf32>`
119 if a compiler only wants to differentiate exact shapes vs dynamic
120 shapes, then it need not consider a more generic shape lattice even
172 especially as for statically known shapes, arbitrary arithmetic
220 1. All static functions are usable for dynamic/unknown shapes;
221 * More involved computations can be performed with statically known shapes
285 is `[n+n, m]` matrix), while some ops only have defined shapes under certain
292 arbitrary computations needed to specify output shapes.
/llvm-project-15.0.7/mlir/lib/Dialect/Tensor/IR/
H A DTensorInferTypeOpInterfaceImpl.cpp176 SmallVector<Value> shapes; in reifyResultShapes() local
196 shapes.push_back(applyMapToValues( in reifyResultShapes()
199 reifiedReturnShapes.emplace_back(std::move(shapes)); in reifyResultShapes()
/llvm-project-15.0.7/mlir/test/Dialect/Tosa/
H A Dconstrained_shapes.mlir6 // Uses argmax as canonical example to validate constrained TOSA tensor shapes.
/llvm-project-15.0.7/mlir/include/mlir/Dialect/
H A DTraits.h62 bool staticallyKnownBroadcastable(ArrayRef<SmallVector<int64_t, 6>> shapes);
/llvm-project-15.0.7/mlir/docs/Tutorials/Toy/
H A DCh-4.md31 simply propagate the shapes through the computation until they are all known.
33 site could deduce different shapes. One possibility would be to perform symbolic
36 be function specialization, where every call site with new argument shapes
220 casts between two different shapes.
309 simple shape inference pass to propagate shapes intraprocedurally (within a
323 to have their result shapes inferred.
382 to infer their output shapes. The ShapeInferencePass will operate on functions:
425 // Ask the operation to infer its output shapes.
/llvm-project-15.0.7/mlir/test/lib/Dialect/Test/
H A DTestDialect.cpp1180 llvm::SmallVectorImpl<Value> &shapes) { in reifyReturnTypeShapes() argument
1181 shapes = SmallVector<Value, 1>{ in reifyReturnTypeShapes()
1188 llvm::SmallVectorImpl<Value> &shapes) { in reifyReturnTypeShapes() argument
1190 shapes.reserve(operands.size()); in reifyReturnTypeShapes()
1197 shapes.push_back(builder.create<tensor::FromElementsOp>( in reifyReturnTypeShapes()
1205 OpBuilder &builder, ReifiedRankedShapedTypeDims &shapes) { in reifyResultShapes() argument
1207 shapes.reserve(getNumOperands()); in reifyResultShapes()
1215 shapes.emplace_back(std::move(currShape)); in reifyResultShapes()
/llvm-project-15.0.7/flang/lib/Lower/
H A DConvertVariable.cpp1376 shapes.emplace_back(fir::factory::genMaxWithZero(builder, loc, ub)); in mapSymbolAttributes()
1383 shapes.emplace_back(dimInfo.getResult(1)); in mapSymbolAttributes()
1385 shapes.emplace_back(builder.create<fir::UndefOp>(loc, idxTy)); in mapSymbolAttributes()
1547 for (int64_t i : recoverShapeVector(x.shapes, preAlloc)) in mapSymbolAttributes()
1592 llvm::SmallVector<mlir::Value> shapes; in mapSymbolAttributes() local
1593 populateShape(shapes, x.bounds, argBox); in mapSymbolAttributes()
1595 symMap.addSymbolWithShape(sym, addr, shapes, true); in mapSymbolAttributes()
1602 createNewLocal(converter, loc, var, preAlloc, shapes); in mapSymbolAttributes()
1603 symMap.addSymbolWithShape(sym, local, shapes); in mapSymbolAttributes()
1648 for (int64_t i : recoverShapeVector(x.shapes, preAlloc)) in mapSymbolAttributes()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/IR/
H A DLinalgInterfaces.cpp600 SmallVector<Value> shapes; in reifyResultShapes() local
603 shapes.push_back(createOrFoldDimOp(b, loc, opOperand->get(), dim)); in reifyResultShapes()
605 shapes.push_back(allResultDimValues[pos]); in reifyResultShapes()
608 reifiedReturnShapes.emplace_back(std::move(shapes)); in reifyResultShapes()
/llvm-project-15.0.7/mlir/examples/toy/Ch3/include/toy/
H A DOps.td96 The shapes of the tensor operands are expected to match.
207 tensors. The shapes of the tensor operands are expected to match.
247 the same number of elements but different shapes. For example:
/llvm-project-15.0.7/mlir/examples/toy/Ch2/include/toy/
H A DOps.td97 The shapes of the tensor operands are expected to match.
208 tensors. The shapes of the tensor operands are expected to match.
248 the same number of elements but different shapes. For example:
/llvm-project-15.0.7/mlir/examples/toy/Ch3/mlir/
H A DToyCombine.td57 // Reshape(x) = x, where input and output shapes are identical
/llvm-project-15.0.7/mlir/examples/toy/Ch7/mlir/
H A DToyCombine.td57 // Reshape(x) = x, where input and output shapes are identical
/llvm-project-15.0.7/mlir/examples/toy/Ch6/mlir/
H A DToyCombine.td57 // Reshape(x) = x, where input and output shapes are identical
/llvm-project-15.0.7/mlir/examples/toy/Ch4/mlir/
H A DToyCombine.td57 // Reshape(x) = x, where input and output shapes are identical
/llvm-project-15.0.7/mlir/examples/toy/Ch5/mlir/
H A DToyCombine.td57 // Reshape(x) = x, where input and output shapes are identical

123