Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp | ||
---|---|---|
547 | Actually you can simply do rewriter.create<scf::WhileOp>(loc, capactiy.getType(), capacity); as ArrayRef can be implicitly converted from a single element. |
very neat, thanks for writing this so quickly!
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp | ||
---|---|---|
504 | I think you need to keep the "buffer" in the "capacity(buffer)", as before | |
512 | I actually like your original, which can now be size(buffer) += n | |
524 | this is of course very minor, but can we avoid creating the constant altogether for the default case and just set nIsOne directly (but of course, keep the check for when it is a runtime value that happens to be a constant 1)? |
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp | ||
---|---|---|
524 | Need to create the constant n for computing the newSize and updating size(buffer). | |
544 | the O(1) alg is like this. Per offline discussion, keep the current approach for simplicity. If (a<b) { |
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp | ||
---|---|---|
505 | you are missing a new_capacity = capacity(buffer) before the while-loop (not that we actually run the comments ;-) but still... | |
543 | Note that you already have the pseudo code above in the comments, so I would not repeat too much, |
I think you need to keep the "buffer" in the "capacity(buffer)", as before