MLIR: lib/Dialect/AMDGPU/Transforms/TransferReadToLoad.cpp File Reference (original) (raw)
Go to the source code of this file.
Namespaces |
---|
Functions | |
---|---|
static LogicalResult | transferPreconditions (PatternRewriter &rewriter, VectorTransferOpInterface xferOp, bool &requiresBroadcasting, VectorType &unbroadcastedVectorType) |
This pattern supports lowering of: vector.transfer_read to a combination of vector.load, arith.select and vector.broadcast if all of the following hold: More... | |
static Value | createVectorLoadForMaskedLoad (OpBuilder &builder, Location loc, vector::TransferReadOp readOp, bool requiresBroadcasting, VectorType unbroadcastedVectorType) |
◆ GEN_PASS_DEF_AMDGPUTRANSFERREADTOLOADPASS
#define GEN_PASS_DEF_AMDGPUTRANSFERREADTOLOADPASS
◆ createVectorLoadForMaskedLoad()
static Value createVectorLoadForMaskedLoad ( OpBuilder & builder, Location loc, vector::TransferReadOp readOp, bool requiresBroadcasting, VectorType unbroadcastedVectorType ) | static |
---|
◆ transferPreconditions()
static LogicalResult transferPreconditions ( PatternRewriter & rewriter, VectorTransferOpInterface xferOp, bool & requiresBroadcasting, VectorType & unbroadcastedVectorType ) | static |
---|
This pattern supports lowering of: vector.transfer_read
to a combination of vector.load
, arith.select
and vector.broadcast
if all of the following hold:
- The transfer op is masked.
- The memref is in buffer address space.
- Stride of most minor memref dimension must be 1.
- Out-of-bounds masking is not required.
- If the memref's element type is a vector type then it coincides with the result type.
- The permutation map doesn't perform permutation (broadcasting is allowed). Note: those conditions mostly come from TransferReadToVectorLoadLowering pass.
Definition at line 47 of file TransferReadToLoad.cpp.
References mlir::RewriterBase::notifyMatchFailure(), and vectorShape().
◆ kTransferReadNeedsMask
constexpr char kTransferReadNeedsMask[] | staticconstexpr |
---|