|
MLIR 22.0.0git
|
#include "SparseTensorIterator.h"#include "CodegenUtils.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "mlir/Dialect/SCF/IR/SCF.h"#include "mlir/Dialect/Tensor/IR/Tensor.h"Go to the source code of this file.
Macros | |
| #define | CMPI(p, lhs, rhs) |
| #define | C_FALSE (constantI1(b, l, false)) |
| #define | C_TRUE (constantI1(b, l, true)) |
| #define | C_IDX(v) |
| #define | YIELD(vs) |
| #define | ADDI(lhs, rhs) |
| #define | ORI(lhs, rhs) |
| #define | ANDI(lhs, rhs) |
| #define | SUBI(lhs, rhs) |
| #define | MULI(lhs, rhs) |
| #define | MINUI(lhs, rhs) |
| #define | REMUI(lhs, rhs) |
| #define | DIVUI(lhs, rhs) |
| #define | SELECT(c, lhs, rhs) |
Typedefs | |
| using | ValuePair = std::pair<Value, Value> |
| using | ValueTuple = std::tuple<Value, Value, Value> |
Functions | |
| static scf::ValueVector | genWhenInBound (OpBuilder &b, Location l, SparseIterator &it, ValueRange elseRet, llvm::function_ref< scf::ValueVector(OpBuilder &, Location, Value)> builder) |
| static Value | offsetFromMinCrd (OpBuilder &b, Location l, Value minCrd, Value size) |
| Generates code to compute the absolute offset of the slice based on the provide minimum coordinates in the slice. | |
| static const SparseIterator * | tryUnwrapFilter (const SparseIterator *it) |
Definition at line 32 of file SparseTensorIterator.cpp.
Referenced by offsetFromMinCrd().
Definition at line 34 of file SparseTensorIterator.cpp.
Definition at line 28 of file SparseTensorIterator.cpp.
| #define C_IDX | ( | v | ) |
Definition at line 30 of file SparseTensorIterator.cpp.
Referenced by offsetFromMinCrd().
Definition at line 29 of file SparseTensorIterator.cpp.
Definition at line 24 of file SparseTensorIterator.cpp.
Referenced by offsetFromMinCrd().
Definition at line 39 of file SparseTensorIterator.cpp.
Definition at line 37 of file SparseTensorIterator.cpp.
Referenced by mlir::gpu::convertReductionKind().
Definition at line 36 of file SparseTensorIterator.cpp.
Definition at line 33 of file SparseTensorIterator.cpp.
Definition at line 38 of file SparseTensorIterator.cpp.
Definition at line 40 of file SparseTensorIterator.cpp.
Referenced by offsetFromMinCrd().
Definition at line 35 of file SparseTensorIterator.cpp.
Referenced by offsetFromMinCrd().
| #define YIELD | ( | vs | ) |
Definition at line 31 of file SparseTensorIterator.cpp.
Referenced by genWhenInBound().
Definition at line 18 of file SparseTensorIterator.cpp.
| using ValueTuple = std::tuple<Value, Value, Value> |
Definition at line 19 of file SparseTensorIterator.cpp.
|
static |
Definition at line 246 of file SparseTensorIterator.cpp.
References b, mlir::sparse_tensor::SparseIterator::deref(), mlir::sparse_tensor::SparseIterator::genNotEnd(), mlir::ValueRange::getTypes(), and YIELD.
Generates code to compute the absolute offset of the slice based on the provide minimum coordinates in the slice.
E.g., when reducing d0 + d1 + d2, we need two slices to fully reduced the expression, i,e, s1 = slice(T, d0), s2 = slice(s1, d1). The absolute offset is the offset computed relative to the initial tensors T.
When isNonEmpty == true, the computed offset is meaningless and should not be used during runtime, the method generates code to return 0 currently in that case.
offset = minCrd >= size ? minCrd - size + 1 : 0;
Definition at line 276 of file SparseTensorIterator.cpp.
|
static |
Definition at line 1672 of file SparseTensorIterator.cpp.
Referenced by mlir::sparse_tensor::makeNonEmptySubSectIterator(), and mlir::sparse_tensor::makeTraverseSubSectIterator().