This allows us to use buildLattices in the Merger unittests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
152 | Add: Returns index of the root expression. since it is now public API | |
153 | Since we are pulling this out, perhaps we should use the Linalg in the name, something like "buildLatticesFromLinalgOp". That way, we can later add other "builders" | |
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
140–141 | we don't generally repeat the comment from header in cc file (style in a nutshell: header comments explain API, CC comments explain implementation) |
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
153 | I was actually confusing my feedback with buildTensorExp(), which perhaps should be moved into the merger as well. For this case, it only uses the linalg op for getNumInputsAndOutputs(), which the merger already knows about. So I think you can simplify the API and not rely on linalg at this point |
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
---|---|---|
147 | I was thinking, since we have this in its own self-contained file and class now, const unsigned syntheticTensor; and initialize that to t in the constructor? This will read a bit nice than all the numTensors - 1 an outPut tensor + 1 we have at other places ;-) |
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
---|---|---|
147 | Added! I looked for other places to use syntheticTensor but this seems to be the only place we need to use it. |
Add: Returns index of the root expression.
since it is now public API