@@ -2526,34 +2526,34 @@ MemRefType CollapseShapeOp::computeCollapsedType(
25262526 srcType.getMemorySpace ());
25272527}
25282528
2529- MemRefType
2530- CollapseShapeOp::inferCollapsedType (MemRefType type,
2531- ArrayRef<AffineMap> reassociation) {
2532- auto shape = type.getShape ();
2533- SmallVector<int64_t , 4 > newShape;
2534- assert (isReassociationValid (reassociation) && " invalid reassociation" );
2535- unsigned currentDim = 0 ;
2536- for (AffineMap m : reassociation) {
2537- unsigned dim = m.getNumResults ();
2538- auto band = shape.slice (currentDim, dim);
2539- int64_t size = 1 ;
2540- if (llvm::is_contained (band, ShapedType::kDynamic ))
2541- size = ShapedType::kDynamic ;
2542- else
2543- for (unsigned d = 0 ; d < dim; ++d)
2544- size *= shape[currentDim + d];
2545- newShape.push_back (size);
2546- currentDim += dim;
2547- }
2548- return MemRefType::get (newShape, type.getElementType ());
2549- }
2550-
2551- MemRefType CollapseShapeOp::inferCollapsedType (
2552- MemRefType type, SmallVector<ReassociationIndices> reassociation) {
2553- return inferCollapsedType (
2554- type, getSymbolLessAffineMaps (convertReassociationIndicesToExprs (
2555- type.getContext (), reassociation)));
2556- }
2529+ // MemRefType
2530+ // CollapseShapeOp::inferCollapsedType(MemRefType type,
2531+ // ArrayRef<AffineMap> reassociation) {
2532+ // auto shape = type.getShape();
2533+ // SmallVector<int64_t, 4> newShape;
2534+ // assert(isReassociationValid(reassociation) && "invalid reassociation");
2535+ // unsigned currentDim = 0;
2536+ // for (AffineMap m : reassociation) {
2537+ // unsigned dim = m.getNumResults();
2538+ // auto band = shape.slice(currentDim, dim);
2539+ // int64_t size = 1;
2540+ // if (llvm::is_contained(band, ShapedType::kDynamic))
2541+ // size = ShapedType::kDynamic;
2542+ // else
2543+ // for (unsigned d = 0; d < dim; ++d)
2544+ // size *= shape[currentDim + d];
2545+ // newShape.push_back(size);
2546+ // currentDim += dim;
2547+ // }
2548+ // return MemRefType::get(newShape, type.getElementType());
2549+ // }
2550+
2551+ // MemRefType CollapseShapeOp::inferCollapsedType(
2552+ // MemRefType type, SmallVector<ReassociationIndices> reassociation) {
2553+ // return inferCollapsedType(
2554+ // type, getSymbolLessAffineMaps(convertReassociationIndicesToExprs(
2555+ // type.getContext(), reassociation)));
2556+ // }
25572557
25582558void CollapseShapeOp::build (OpBuilder &b, OperationState &result, Value src,
25592559 ArrayRef<ReassociationIndices> reassociation,
0 commit comments