/llvm-project/mlir/include/mlir/Dialect/Utils/ |
H A D | StructuredOpsUtils.h | 77 inline void findPositionsOfType(ArrayRef<utils::IteratorType> iteratorTypes, in findPositionsOfType() 78 utils::IteratorType iteratorTypeName, in findPositionsOfType() 94 struct IteratorType { struct 95 IteratorType(IteratorTypeT iter) : iter(iter) {} in IteratorType() function 101 struct Par : public IteratorType { 102 Par() : IteratorType(IteratorTypeT::parallel) {} in Par() 104 struct Red : public IteratorType { 105 Red() : IteratorType(IteratorTypeT::reduction) {} in Red() 113 bool iters(ArrayRef<IteratorType> its) { in iters()
|
H A D | StructuredOpsUtils.td | 15 def IteratorType : I32EnumAttr<"IteratorType", "Iterator type", [
|
/llvm-project/mlir/include/mlir/Dialect/Mesh/Interfaces/ |
H A D | ShardingInterfaceImpl.h | 31 ArrayRef<utils::IteratorType> loopIteratorTypes, 35 ArrayRef<utils::IteratorType> loopIteratorTypes, 40 ArrayRef<utils::IteratorType> loopIteratorTypes, 59 SmallVector<utils::IteratorType> in getLoopIteratorTypes() 61 SmallVector<utils::IteratorType> iterTypes; in getLoopIteratorTypes() 91 SmallVector<utils::IteratorType> &iterTypes) const { in populateIteratorTypes() 99 iterTypes.push_back(utils::IteratorType::parallel); in populateIteratorTypes() 109 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getLoopIteratorTypes() 114 SmallVector<utils::IteratorType> types(type.getRank(), in getLoopIteratorTypes() 115 utils::IteratorType in getLoopIteratorTypes() [all...] |
/llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/Utils/ |
H A D | IterationGraphSorter.cpp | 29 explicit AffineDimFinder(ArrayRef<utils::IteratorType> itTypes) in AffineDimFinder() 39 void setPickedIterType(utils::IteratorType iterType) { in setPickedIterType() 58 utils::IteratorType pickIterType; 60 ArrayRef<utils::IteratorType> iterTypes; 92 if (iterTypes[i] == utils::IteratorType::reduction) in topoSort() 110 if (iterTypes[dst] == utils::IteratorType::reduction) in topoSort() 140 SmallVector<utils::IteratorType> iterTypes = in fromGenericOp() 149 AffineMap loop2OutLvl, SmallVector<utils::IteratorType> &&iterTypes) in IterationGraphSorter() 204 finder.setPickedIterType(utils::IteratorType::reduction); in addConstraints()
|
H A D | IterationGraphSorter.h | 23 enum class IteratorType : uint32_t; 61 SmallVector<utils::IteratorType> &&iterTypes); 80 SmallVector<utils::IteratorType> iterTypes;
|
/llvm-project/mlir/lib/Dialect/Tosa/IR/ |
H A D | ShardingInterfaceImpl.cpp | 34 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getLoopIteratorTypes() 39 SmallVector<utils::IteratorType> types(tensorType.getRank() + 1, in getLoopIteratorTypes() 40 utils::IteratorType::parallel); in getLoopIteratorTypes() 41 types[tensorType.getRank()] = utils::IteratorType::reduction; in getLoopIteratorTypes()
|
/llvm-project/mlir/lib/Reducer/ |
H A D | ReductionTreePass.cpp | 85 template <typename IteratorType> 109 IteratorType iter(root); in findOptimal() 111 while (iter != IteratorType::end()) { in findOptimal() 150 template <typename IteratorType> 159 if (failed(findOptimal<IteratorType>(module, region, /*patterns=*/{}, test, in findOptimal() 164 return findOptimal<IteratorType>(module, region, patterns, test, in findOptimal()
|
/llvm-project/mlir/lib/Dialect/Mesh/Interfaces/ |
H A D | ShardingInterface.cpp | 178 SmallVector<utils::IteratorType> loopTypes = getLoopIteratorTypes(); in verifyShardingInterfaceImpl() 213 for (utils::IteratorType type : getLoopIteratorTypes()) { 273 SmallVector<utils::IteratorType> loopTypes = in defaultGetShardingOption() 405 AffineMap map, ArrayRef<utils::IteratorType> loopTypes, in getShardingAttribute() 428 utils::IteratorType iType = std::get<0>(it); in getShardingAttribute() 488 SmallVector<utils::IteratorType> loopTypes = in defaultGetShardingAnnotations() 521 ArrayRef<utils::IteratorType> loopTypes, in addShardOp() 552 SmallVector<utils::IteratorType> loopTypes = in defaultAddShardingAnnotations() 637 ArrayRef<utils::IteratorType> loopIteratorTypes, in getMeshAxisAssignmentForLoopIterators() 676 ArrayRef<utils::IteratorType> loopIteratorType in getReductionMeshAxes() [all...] |
/llvm-project/mlir/lib/Dialect/Linalg/Transforms/ |
H A D | ConvertConv2DToImg2Col.cpp | 135 auto parallel = utils::IteratorType::parallel; in rewriteInIm2Col() 136 auto reduction = utils::IteratorType::reduction; in rewriteInIm2Col() 137 SmallVector<utils::IteratorType> img2colIterators(nloops, parallel); in rewriteInIm2Col() 188 SmallVector<utils::IteratorType> genericIterators = {parallel, parallel, in rewriteInIm2Col() 251 SmallVector<utils::IteratorType> loopAttributeTypes( in rewriteInIm2Col() 252 nloops, utils::IteratorType::parallel); in rewriteInIm2Col() 304 SmallVector<utils::IteratorType> loopAttributeTypes( in rewriteInIm2Col() 305 nloops, utils::IteratorType::parallel); in rewriteInIm2Col() 420 auto parallel = utils::IteratorType::parallel; in rewriteInIm2Col() 421 auto reduction = utils::IteratorType::reduction; in rewriteInIm2Col() [all …]
|
H A D | SplitReduction.cpp | 159 SmallVector<utils::IteratorType> newIteratorTypes; in splitReduction() 163 newIteratorTypes.push_back(utils::IteratorType::parallel); in splitReduction() 167 newIteratorTypes.push_back(utils::IteratorType::parallel); in splitReduction() 181 SmallVector<utils::IteratorType> reductionIteratorTypes; in splitReduction() 185 reductionIteratorTypes.push_back(utils::IteratorType::reduction); in splitReduction() 188 reductionIteratorTypes.push_back(utils::IteratorType::parallel); in splitReduction() 366 utils::IteratorType::parallel); in splitReductionByScaling() 393 SmallVector<utils::IteratorType> reductionIteratorTypes( in splitReductionByScaling() 394 originalOutputType.getRank() + 1, utils::IteratorType::parallel); in splitReductionByScaling() 396 utils::IteratorType::reduction; in splitReductionByScaling()
|
H A D | MeshShardingInterfaceImpl.cpp | 231 ArrayRef<utils::IteratorType> loopIteratorTypes, in spmdizeLinalgOpWithShardedReduction() 271 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getIndexingMaps() 291 SmallVector<utils::IteratorType> iteratorTypes = in getReductionLoopIteratorKinds() 295 [](unsigned count, utils::IteratorType iter) { in spmdize() 296 return count + (iter == utils::IteratorType::reduction); in spmdize() 321 SmallVector<utils::IteratorType> loopIteratorTypes = in spmdize()
|
H A D | ElementwiseToLinalg.cpp | 89 SmallVector<utils::IteratorType, 6> iteratorTypes( in matchAndRewrite() 90 rank, utils::IteratorType::parallel); in matchAndRewrite()
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/loop-convert/ |
H A D | structures.h | 206 template<typename IteratorType> 208 typedef IteratorType* iterator; 209 typedef const IteratorType* const_iterator; 210 IteratorType *operator->(); 211 IteratorType operator*();
|
/llvm-project/mlir/lib/Dialect/NVGPU/Utils/ |
H A D | MMAUtils.cpp | 220 params.contiguousDimType = transpose ? vector::IteratorType::parallel in getLdMatrixParams() 221 : vector::IteratorType::reduction; in getLdMatrixParams() 223 if (params.contiguousDimType == vector::IteratorType::reduction) { in getLdMatrixParams() 254 (params.contiguousDimType == vector::IteratorType::reduction) ? 0 : 1; in getLaneIdToLdMatrixMatrixCoord() 264 if (params.contiguousDimType == vector::IteratorType::reduction) in getLaneIdToLdMatrixMatrixCoord() 270 if (params.contiguousDimType == vector::IteratorType::parallel) in getLaneIdToLdMatrixMatrixCoord()
|
/llvm-project/mlir/lib/Dialect/ArmNeon/Transforms/ |
H A D | LowerContractionToSMMLAPattern.cpp | 77 vector::IteratorType::reduction) { in matchAndRewrite() 80 if (llvm::any_of(ArrayRef<vector::IteratorType>(iteratorTypes).drop_back(1), in matchAndRewrite() 81 [](vector::IteratorType iteratorType) { in matchAndRewrite() 82 return iteratorType != vector::IteratorType::parallel; in matchAndRewrite()
|
/llvm-project/mlir/lib/Dialect/Linalg/Utils/ |
H A D | Utils.cpp | 184 bool isParallelIterator(utils::IteratorType iteratorType) { in isParallelIterator() 185 return iteratorType == utils::IteratorType::parallel; in isParallelIterator() 188 bool isReductionIterator(utils::IteratorType iteratorType) { in isReductionIterator() 189 return iteratorType == utils::IteratorType::reduction; in isReductionIterator() 262 SmallVector<utils::IteratorType> iteratorTypes(memrefTypeTo.getRank(), in makeTransposeOp() 263 utils::IteratorType::parallel); in makeTransposeOp() 279 ArrayRef<utils::IteratorType> iteratorTypes, in makeTransposeOp() 322 ArrayRef<utils::IteratorType> iteratorTypes, in doit() 374 ValueRange steps, ArrayRef<utils::IteratorType> iteratorTypes, in doit() 489 ArrayRef<utils::IteratorType> iteratorType in generateParallelLoopNest() [all...] |
/llvm-project/mlir/lib/Dialect/Tosa/Utils/ |
H A D | ConversionUtils.cpp | 19 SmallVector<utils::IteratorType> 21 return SmallVector<utils::IteratorType>(nParallelLoops, in getNParallelLoopsAttrs() 22 utils::IteratorType::parallel); in getNParallelLoopsAttrs()
|
/llvm-project/mlir/lib/Dialect/Linalg/IR/ |
H A D | LinalgInterfaces.cpp | 358 ArrayRef<utils::IteratorType> iterators, in inferContractionDimsImpl() 359 utils::IteratorType iter) { in inferContractionDimsImpl() 375 auto par = utils::IteratorType::parallel; in inferContractionDims() 376 auto red = utils::IteratorType::reduction; in inferContractionDims() 383 static FailureOr<SmallVector<utils::IteratorType>> in inferContractionDims() 387 SmallVector<utils::IteratorType> iterators(map.getNumDims(), red); in inferContractionDims() 407 ArrayRef<utils::IteratorType> iterators) { in isContractionInterfaceImpl() 898 if (iteratorTypes[outputDim] != utils::IteratorType::parallel) in isConvolutionInterfaceImpl() 906 if (iteratorTypes[outputDim] != utils::IteratorType::parallel) in getMatchConvolutionMessage() 915 if (iteratorTypes[outputDim] != utils::IteratorType in getMatchConvolutionMessage() [all...] |
H A D | LinalgOps.cpp | 1015 ArrayRef<utils::IteratorType> iteratorTypes, StringRef doc, in print() 1023 [&](utils::IteratorType iter) -> mlir::Attribute { in print() 1034 ArrayRef<utils::IteratorType> iteratorTypes, StringRef doc, in print() 1045 ArrayRef<utils::IteratorType> iteratorTypes, in print() 1056 ArrayRef<utils::IteratorType> iteratorTypes, in parse() 1078 .getAsValueRange<IteratorTypeAttr, utils::IteratorType>(); in parse() 1079 // Convert IteratorType enums into the string representation. This is in parse() 1085 iteratorTypes, [&](utils::IteratorType t) -> Attribute { in parse() 1140 // Convert array of string into an array of IteratorType enums. This is in getGenericEffectsImpl() 1572 SmallVector<utils::IteratorType> MapO in getEffects() [all...] |
/llvm-project/mlir/include/mlir/Dialect/Linalg/Utils/ |
H A D | Utils.h | 51 bool isParallelIterator(utils::IteratorType iteratorType); 54 bool isReductionIterator(utils::IteratorType iteratorType); 355 ArrayRef<utils::IteratorType> iteratorTypes,
|
/llvm-project/mlir/include/mlir/Dialect/Linalg/IR/ |
H A D | LinalgStructuredOps.td | 174 "ArrayRef<utils::IteratorType>":$iteratorTypes, "StringRef":$doc, 179 "ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<utils::IteratorType>":$iteratorTypes, 185 "ArrayRef<utils::IteratorType>":$iteratorTypes, 189 "ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<utils::IteratorType>":$iteratorTypes, 297 SmallVector<utils::IteratorType> getIteratorTypesArray(); 388 SmallVector<utils::IteratorType> getIteratorTypesArray(); 455 SmallVector<utils::IteratorType> getIteratorTypesArray(); 527 SmallVector<utils::IteratorType> getIteratorTypesArray(); 651 SmallVector<utils::IteratorType> getIteratorTypesArray(); 791 SmallVector<utils::IteratorType> getIteratorTypesArra [all...] |
/llvm-project/mlir/lib/Dialect/Tensor/IR/ |
H A D | TensorTilingInterfaceImpl.cpp | 30 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getLoopIteratorTypes() 32 SmallVector<utils::IteratorType> iteratorTypes( in getLoopIteratorTypes() 33 padOp.getResultType().getRank(), utils::IteratorType::parallel); in getLoopIteratorTypes() 123 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getTiledImplementation() 128 SmallVector<utils::IteratorType> iteratorTypes( in getTiledImplementation() 129 packOp.getSourceRank(), utils::IteratorType::parallel); in getTiledImplementation() 496 SmallVector<utils::IteratorType> getLoopIteratorTypes(Operation *op) const { in getIterationDomainTileFromOperandTile() 498 SmallVector<utils::IteratorType> iteratorTypes( in getIterationDomainTileFromOperandTile() 499 unpackOp.getDestRank(), utils::IteratorType::parallel); in getIterationDomainTileFromOperandTile()
|
/llvm-project/mlir/include/mlir/Dialect/Vector/IR/ |
H A D | VectorOps.h | 148 return cast<IteratorTypeAttr>(attr).getValue() == IteratorType::parallel; 153 return cast<IteratorTypeAttr>(attr).getValue() == IteratorType::reduction;
|
/llvm-project/mlir/include/mlir/Dialect/Mesh/IR/ |
H A D | MeshOps.h | 100 inline bool isReductionLoop(utils::IteratorType iType) { in collectiveProcessGroupSize() 101 return iType == utils::IteratorType::reduction; in collectiveProcessGroupSize()
|
/llvm-project/mlir/include/mlir/Dialect/SparseTensor/IR/ |
H A D | SparseTensorTypes.td | 119 ::mlir::sparse_tensor::IteratorType getIteratorType() const; 161 : CPred<"::llvm::isa<::mlir::sparse_tensor::IteratorType>($_self)">; 169 "::mlir::sparse_tensor::IteratorType">;
|