Add the tablegen definition for a new select operation.
This is used to filter the entries of a sparse tensor via a function
that decides whether each entry should be kept or not.
Details
- Reviewers
aartbik - Commits
- rG07150fece507: [mlir][sparse] Add sparse_tensor.select operation
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
looks good, few nits
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td | ||
---|---|---|
612 | evaluation within a linalg.generic operation | |
622 | Can we use e.g. A >= 4.0 just to show the threshold concept (the >= 0 feels still a bit "sparse") | |
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp | ||
461–481 | what happened to the empty test? |
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp | ||
---|---|---|
461–481 | I realized this was a copy-paste mistake that came over from binary and unary. Those operations can have empty regions, but reduce cannot. Neither can select. If the region is empty, we want to fail, and verifyNumBlockArgs will give a reasonable failure message in that case. |
evaluation within a linalg.generic operation