Lines Matching defs:reassociation

2131                      ArrayRef<ReassociationIndices> reassociation,
2133 // There must be one reassociation group per collapsed dimension.
2134 if (collapsedShape.size() != reassociation.size())
2135 return op->emitOpError("invalid number of reassociation groups: found ")
2136 << reassociation.size() << ", expected " << collapsedShape.size();
2139 // reassociation indices).
2141 for (const auto &it : llvm::enumerate(reassociation)) {
2148 return op->emitOpError("reassociation indices must be contiguous");
2151 return op->emitOpError("reassociation index ")
2154 // Check if there are multiple dynamic dims in a reassociation group.
2158 "at most one dimension in a reassociation group may be dynamic");
2167 << ") must be dynamic if and only if reassociation group is "
2170 // If all dims in the reassociation group are static, the size of the
2179 << ") must equal reassociation group size (" << groupSize << ")";
2190 // Rank >= 1: Number of dimensions among all reassociation groups must match
2194 << ") inconsistent with number of reassociation indices (" << nextDim
2220 /// specified reassociation indices.
2223 ArrayRef<ReassociationIndices> reassociation) {
2228 assert(srcStrides.size() == reassociation.size() && "invalid reassociation");
2230 // 1-1 mapping between srcStrides and reassociation packs.
2245 for (auto it : llvm::reverse(llvm::zip(reassociation, srcStrides))) {
2263 ArrayRef<ReassociationIndices> reassociation) {
2274 computeExpandedLayoutMap(srcType, resultShape, reassociation);
2284 ArrayRef<ReassociationIndices> reassociation,
2287 inferExpandShapeOutputShape(b, loc, expandedType, reassociation,
2296 ArrayRef<ReassociationIndices> reassociation,
2301 getReassociationIndicesAttribute(builder, reassociation),
2307 ArrayRef<ReassociationIndices> reassociation) {
2312 builder, result.location, memrefResultTy, reassociation, inputShape);
2314 // dynamic dimensions in the same reassociation group.
2316 build(builder, result, memrefResultTy, src, reassociation, *outputShape);
2321 ArrayRef<ReassociationIndices> reassociation) {
2325 ExpandShapeOp::computeExpandedType(srcType, resultShape, reassociation);
2329 build(builder, result, *resultType, src, reassociation);
2334 ArrayRef<ReassociationIndices> reassociation,
2339 ExpandShapeOp::computeExpandedType(srcType, resultShape, reassociation);
2343 build(builder, result, *resultType, src, reassociation, outputShape);
2410 /// specified reassociation indices.
2412 /// Note: All collapsed dims in a reassociation group must be contiguous. It is
2418 ArrayRef<ReassociationIndices> reassociation,
2426 // The result stride of a reassociation group is the stride of the last entry
2427 // of the reassociation. (TODO: Should be the minimum stride in the
2428 // reassociation because strides are not necessarily sorted. E.g., when using
2432 resultStrides.reserve(reassociation.size());
2433 for (const ReassociationIndices &reassoc : reassociation) {
2448 // Validate that each reassociation group is contiguous.
2450 for (const ReassociationIndices &reassoc : llvm::reverse(reassociation)) {
2481 MemRefType srcType, ArrayRef<ReassociationIndices> reassociation) {
2486 return succeeded(computeCollapsedLayoutMap(srcType, reassociation,
2491 MemRefType srcType, ArrayRef<ReassociationIndices> reassociation) {
2493 resultShape.reserve(reassociation.size());
2494 for (const ReassociationIndices &group : reassociation) {
2514 computeCollapsedLayoutMap(srcType, reassociation);
2522 ArrayRef<ReassociationIndices> reassociation,
2526 CollapseShapeOp::computeCollapsedType(srcType, reassociation);
2528 getReassociationIndicesAttribute(b, reassociation));