MLIR
17.0.0git
|
Tensor expression. Represents an MLIR expression in tensor index notation. More...
#include "mlir/Dialect/SparseTensor/Utils/Merger.h"
Classes | |
struct | Children |
Child subexpressions for non-leaf expressions. More... | |
Public Types | |
enum class | Kind { kTensor = 0 , kInvariant , kLoopVar , kAbsF , kAbsC , kAbsI , kCeilF , kFloorF , kSqrtF , kSqrtC , kExpm1F , kExpm1C , kLog1pF , kLog1pC , kSinF , kSinC , kTanhF , kTanhC , kNegF , kNegC , kNegI , kTruncF , kExtF , kCastFS , kCastFU , kCastSF , kCastUF , kCastS , kCastU , kCastIdx , kTruncI , kCIm , kCRe , kBitCast , kBinaryBranch , kUnary , kSelect , kMulF , kMulC , kMulI , kDivF , kDivC , kDivS , kDivU , kAddF , kAddC , kAddI , kSubF , kSubC , kSubI , kAndI , kOrI , kXorI , kShrS , kShrU , kShlI , kBinary , kReduce } |
Tensor expression kind. More... | |
Public Member Functions | |
TensorExp (Kind k, unsigned x, ExprId y, Value v, Operation *op) | |
Public Attributes | |
Kind | kind |
Tensor expression kind. More... | |
union { | |
TensorId tensor | |
kTensor expressions simply have a tensor identifier. More... | |
LoopId loop | |
kLoopVar expressions simply have a loop identifier. More... | |
Children children | |
All other expressions hold the ExprId s of their children. More... | |
}; | |
Value | val |
Direct link to IR for an invariant or the destination value (to infer destination type) of a cast operation During code generation, this field may be used to cache "hoisted" loop invariant tensor loads. More... | |
Operation * | op |
Code blocks used by semirings. More... | |
Tensor expression. Represents an MLIR expression in tensor index notation.
|
strong |
Tensor expression kind.
The kLoopVar
leaf kind is for representing linalg::IndexOp
. That is, its argument is a LoopId
identifying the loop-variable in question, and its value will be the current iteration's value of that loop-variable. See the LoopId
documentation for more details.
Definition at line 101 of file Merger.cpp.
References children, mlir::sparse_tensor::TensorExp::Children::e0, mlir::sparse_tensor::TensorExp::Children::e1, kAbsC, kAbsF, kAbsI, kAddC, kAddF, kAddI, kAndI, kBinary, kBinaryBranch, kBitCast, kCastFS, kCastFU, kCastIdx, kCastS, kCastSF, kCastU, kCastUF, kCeilF, kCIm, kCRe, kDivC, kDivF, kDivS, kDivU, kExpm1C, kExpm1F, kExtF, kFloorF, kind, mlir::sparse_tensor::detail::kInvalidId, kInvariant, kLog1pC, kLog1pF, kLoopVar, kMulC, kMulF, kMulI, kNegC, kNegF, kNegI, kOrI, kReduce, kSelect, kShlI, kShrS, kShrU, kSinC, kSinF, kSqrtC, kSqrtF, kSubC, kSubF, kSubI, kTanhC, kTanhF, kTensor, kTruncF, kTruncI, kUnary, kXorI, loop, and tensor.
union { ... } |
Children mlir::sparse_tensor::TensorExp::children |
All other expressions hold the ExprId
s of their children.
Definition at line 118 of file Merger.h.
Referenced by genExp(), genInvariants(), and TensorExp().
Kind mlir::sparse_tensor::TensorExp::kind |
Tensor expression kind.
Definition at line 108 of file Merger.h.
Referenced by genExp(), genInvariants(), genTensorStore(), and TensorExp().
LoopId mlir::sparse_tensor::TensorExp::loop |
kLoopVar
expressions simply have a loop identifier.
Definition at line 115 of file Merger.h.
Referenced by genExp(), and TensorExp().
Operation* mlir::sparse_tensor::TensorExp::op |
TensorId mlir::sparse_tensor::TensorExp::tensor |
kTensor
expressions simply have a tensor identifier.
Definition at line 112 of file Merger.h.
Referenced by genInvariants(), genTensorLoad(), and TensorExp().
Value mlir::sparse_tensor::TensorExp::val |
Direct link to IR for an invariant or the destination value (to infer destination type) of a cast operation During code generation, this field may be used to cache "hoisted" loop invariant tensor loads.
Definition at line 124 of file Merger.h.
Referenced by genInvariantValue(), genTensorLoad(), and genTensorStore().