Details
- Reviewers
aartbik nicolasvasilache Peiming wrengr
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
100 | This looks scary, can we use a unique_ptr for this? |
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
98–101 | We don't use the trailing underscore style anywhere else, so I don't think we should introduce it here. |
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
183–187 | What's the point of having both hasPendingSymmetricValue and also pendingSymmetricValue? Given that the latter is a pointer, you can always check if pendingSymmetricValue is nullptr rather than storing an additional bool |
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
191–192 | I'd rather avoid having this extra counter in the object. For the openSparseTensor function we already track this in the for-loop, so why doesn't the codegen-pass do the same? |
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
183–189 | Akin to my previous comment, why does this need to be handled in the runtime library at all? Why doesn't the codegen-pass just allocate room for the pendingSymmetricValue and pendingSymmetricIndices and handle all this logic on the codegen side? For my own work I'm trying to move more of the file processing stuff out of the library, so it seems like a step backward for the codegen-pass to want to add more stuff to the library |
mlir/include/mlir/ExecutionEngine/SparseTensor/File.h | ||
---|---|---|
100 | Need to discuss this, I actually have a bug here, as deleting void pointer has undefined behavior. | |
183–187 | pendingSymmetricValue is a buffer for storing a pending value that we encountered, and the same buffer is shared during the life time of the reader. That is, we always keep such a buffer, and the buffer only has a valid value right after reading an element and not valid right after we use the value. | |
183–189 | Sorry for not making the context of this work clear. | |
191–192 | In openSparseTensor, we use a loop with two add-element function calls to handle symmetric values. |
Are we keeping codegen solution (controlled by expand_symmetry flag proposed in other pending revision)?
This looks scary, can we use a unique_ptr for this?