MLIR
20.0.0git
|
When lowering an N-d vector transfer op to an (N-1)-d vector transfer op, a temporary buffer is created through which individual (N-1)-d vector are staged. More...
#include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
Public Member Functions | |
VectorTransferToSCFOptions & | setTargetRank (unsigned r) |
VectorTransferToSCFOptions & | enableLowerTensors (bool l=true) |
VectorTransferToSCFOptions & | enableFullUnroll (bool u=true) |
VectorTransferToSCFOptions | enableLowerScalable (bool enable=true) |
Public Attributes | |
unsigned | targetRank = 1 |
Minimal rank to which vector transfer are lowered. More... | |
bool | lowerTensors = false |
Allows vector transfers that operated on tensors to be lowered (this is an uncommon alternative). More... | |
bool | unroll = false |
Triggers full unrolling (vs iterating with a loop) during transfer to scf. More... | |
bool | lowerScalable = false |
Enable scalable vector specific lowerings (which introduce loops). More... | |
When lowering an N-d vector transfer op to an (N-1)-d vector transfer op, a temporary buffer is created through which individual (N-1)-d vector are staged.
This pattern can be applied multiple time, until the transfer op is 1-d. This is consistent with the lack of an LLVM instruction to dynamically index into an aggregate (see the Vector dialect lowering to LLVM deep dive).
An instruction such as:
Lowers to pseudo-IR resembling (unpacking one dimension):
When applying the pattern a second time, the existing alloca() operation is reused and only a second vector.type_cast is added.
Definition at line 52 of file VectorToSCF.h.
|
inline |
Definition at line 68 of file VectorToSCF.h.
References unroll.
|
inline |
Definition at line 76 of file VectorToSCF.h.
References lowerScalable.
|
inline |
Definition at line 62 of file VectorToSCF.h.
References lowerTensors.
|
inline |
Definition at line 55 of file VectorToSCF.h.
bool mlir::VectorTransferToSCFOptions::lowerScalable = false |
Enable scalable vector specific lowerings (which introduce loops).
These work alongside fullUnroll (which unrolls until the first scalable dimension).
Definition at line 75 of file VectorToSCF.h.
Referenced by enableLowerScalable().
bool mlir::VectorTransferToSCFOptions::lowerTensors = false |
Allows vector transfers that operated on tensors to be lowered (this is an uncommon alternative).
Definition at line 61 of file VectorToSCF.h.
Referenced by enableLowerTensors().
unsigned mlir::VectorTransferToSCFOptions::targetRank = 1 |
Minimal rank to which vector transfer are lowered.
Definition at line 54 of file VectorToSCF.h.
bool mlir::VectorTransferToSCFOptions::unroll = false |
Triggers full unrolling (vs iterating with a loop) during transfer to scf.
Definition at line 67 of file VectorToSCF.h.
Referenced by enableFullUnroll().