MLIR  19.0.0git
Functions
SplitReduction.cpp File Reference
#include <optional>
#include <utility>
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Tensor/Utils/Utils.h"
#include "mlir/IR/PatternMatch.h"

Go to the source code of this file.

Functions

static AffineMap scaleReductionDim (LinalgOp op, OpOperand &opOperand, unsigned reductionDimPos, int64_t reductionRatio)
 Rewrite f(i, j, k, ...) into f(i, j, k * ratio + kk, ...) TODO: Additional pattern to rewrite f(i, j, k * ratio + kk, ...) into f(i, j, k, kk, ...) with a proper ExpandShapeOp. More...
 
static AffineMap insertParallelDim (LinalgOp op, OpOperand &opOperand, unsigned reductionDimPos, int64_t size)
 

Function Documentation

◆ insertParallelDim()

static AffineMap insertParallelDim ( LinalgOp  op,
OpOperand opOperand,
unsigned  reductionDimPos,
int64_t  size 
)
static

Definition at line 230 of file SplitReduction.cpp.

◆ scaleReductionDim()

static AffineMap scaleReductionDim ( LinalgOp  op,
OpOperand opOperand,
unsigned  reductionDimPos,
int64_t  reductionRatio 
)
static

Rewrite f(i, j, k, ...) into f(i, j, k * ratio + kk, ...) TODO: Additional pattern to rewrite f(i, j, k * ratio + kk, ...) into f(i, j, k, kk, ...) with a proper ExpandShapeOp.

This is probably better done as a transform to enable better vectorization.

Definition at line 215 of file SplitReduction.cpp.