/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Definitions *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ /// Return the `in_bounds` attribute name. ::mlir::StringRef mlir::VectorTransferOpInterface::getInBoundsAttrName() { return getImpl()->getInBoundsAttrName(getImpl(), getOperation()); } /// Return the `permutation_map` attribute name. ::mlir::StringRef mlir::VectorTransferOpInterface::getPermutationMapAttrName() { return getImpl()->getPermutationMapAttrName(getImpl(), getOperation()); } /// Return the optional in_bounds attribute that specifies for each vector /// dimension whether it is in-bounds or not. (Broadcast dimensions are /// always in-bounds). ::mlir::ArrayAttr mlir::VectorTransferOpInterface::getInBounds() { return getImpl()->getInBounds(getImpl(), getOperation()); } /// Return the memref or ranked tensor operand that this operation operates /// on. In case of a "read" operation, that's the source from which the /// operation reads. In case of a "write" operation, that's the destination /// into which the operation writes. /// TODO: Change name of operand, which is not accurate for xfer_write. ::mlir::Value mlir::VectorTransferOpInterface::getBase() { return getImpl()->getBase(getImpl(), getOperation()); } /// Return the vector that this operation operates on. In case of a "read", /// that's the vector OpResult. In case of a "write", that's the vector /// operand value that is written by the op. ::mlir::Value mlir::VectorTransferOpInterface::getVector() { return getImpl()->getVector(getImpl(), getOperation()); } /// Return the type of the vector that this operation operates on. ::mlir::VectorType mlir::VectorTransferOpInterface::getVectorType() { return getImpl()->getVectorType(getImpl(), getOperation()); } /// Return the indices that specify the starting offsets into the source /// operand. The starting offsets are guaranteed to be in-bounds except /// when the transfer operation is masked or the `in_bounds` array doesn't /// specify that that dimension is not necessarily in bounds. It is undefinied /// behavior if these guarantees are violated. ::mlir::OperandRange mlir::VectorTransferOpInterface::getIndices() { return getImpl()->getIndices(getImpl(), getOperation()); } /// Return the permutation map that describes the mapping of vector /// dimensions to source dimensions, as well as broadcast dimensions. /// /// The permutation result has one result per vector transfer dimension. /// Each result is either a dim expression, indicating the corresponding /// dimension in the source operand, or a constant "0" expression, /// indicating a broadcast dimension. /// /// Note: Nested vector dimensions that are flattened by this op are not /// accounted for in the permutation map. E.g.: /// ``` /// // Vector type has rank 4, but permutation map has only 2 results. That /// // is because there are only 2 transfer dimensions. /// %0 = vector.transfer_read %arg1[%c3, %c3], %vf0 /// {permutation_map = affine_map<(d0, d1) -> (d0, d1)>} /// : memref>, vector<1x1x4x3xf32> /// ``` ::mlir::AffineMap mlir::VectorTransferOpInterface::getPermutationMap() { return getImpl()->getPermutationMap(getImpl(), getOperation()); } /// Return the mask operand if the op has a mask. Otherwise, return an /// empty value. Value mlir::VectorTransferOpInterface::getMask() { return getImpl()->getMask(getImpl(), getOperation()); } /// Returns whether replacing the base operand with a shaped value of /// `newBaseType` and updating the permutation map according to /// `newPermutationMap`, where the replacement would adhere to the /// conditions specified by `updateStartingPosition`, passes any additional /// op-specific constraints. ::mlir::LogicalResult mlir::VectorTransferOpInterface::mayUpdateStartingPosition(::mlir::ShapedType newBaseType, ::mlir::AffineMap newPermutationMap) { return getImpl()->mayUpdateStartingPosition(getImpl(), getOperation(), newBaseType, newPermutationMap); } /// Updates the base of this transfer operation to `newBase`, the indices into /// that base into `newIndices`, and the permutation map to `newPermutationMap`. /// The new base, indices, and map must: /// - Keep the same element type as the base (this condition could be relaxed /// in the future) /// - Preserve the number of transfer dimensions and avoid inserting new /// dimensions unaccounted for in the permutation map - that is, if the transfer operation is /// reading or writing a 4x2 vector to/from an Nx4x2 tensor or memref, it is /// not valid to update that base to an Nx8 one, but updating in an N0xN1x4x2 /// base - or even an Nx16x32 one - is acceptable. Similarly, if the transfer /// rank is 2 and the base is MxN, replacing it with a base that is Mx1xN or /// MxKxN is only permitted if the permutation map is updated to skip the new /// dimension. This restriction means that the updater does not need to reshape /// or otherwise adjust the vector type of the transfer or other related attributes /// like the inbounds attribute array. /// - Must not shrink the size of a transfer dimension such that an `inbounds` /// annotation becomes incorrect. /// - Must pass any op-specific conditions in `mayUpdateStartingPosition` /// /// The update is performed in-place. Implementations of the interface /// should use `RewriterBase::modifyOpInPlace` to ensure proper pattern /// rewriter operation. void mlir::VectorTransferOpInterface::updateStartingPosition(::mlir::RewriterBase& rewriter, ::mlir::Value newBase, ::mlir::ValueRange newIndices, ::mlir::AffineMapAttr newPermutationMap) { return getImpl()->updateStartingPosition(getImpl(), getOperation(), rewriter, newBase, newIndices, newPermutationMap); } /// Return the shape ratio of unrolling to the target vector shape /// `targetShape`. Return `std::nullopt` if the op cannot be unrolled to the /// target vector shape. ::std::optional<::llvm::SmallVector> mlir::VectorUnrollOpInterface::getShapeForUnroll() { return getImpl()->getShapeForUnroll(getImpl(), getOperation()); }