Issue 1 sparse zero write lifecycle - #5
Conversation
aliaksandr-vasilenka-vention
commented
Jul 6, 2026
- Separates Tensors into Dense and Sparse, only places for branching are create and load
- Adds tests for Sparse-zero policy cases
- Implements Sparse-zero policy cases
- Fixes incorrect read value logic when block is missing and index is present for Sparse tensor to follow close fail path
| self.write_block(block_id, block).await | ||
| } | ||
|
|
||
| async fn delete_block(&self, block_id: u64) { |
There was a problem hiding this comment.
How do we handle the case where the entries in a sparse tensor (the blocks) are larger than the configured block size for a dense tensor? We should not support "unlimited block size" in any case
There was a problem hiding this comment.
Not sure what part of code is referenced here. Could you please clarify?
There was a problem hiding this comment.
This is more of an architectural question. Say the block size is 4096 elements. A user creates a sparse tensor of shape [1000, 1000, 64, 64, 64] where axis 1 is the sparse axis. That means each entry on the sparse axis must be represented using multiple blocks on the filesystem (not just one per entry). Is this handled correctly now or is this something we need to address as a follow-up?
There was a problem hiding this comment.
Need to check it out
|
To be noted:
|
haydnv
left a comment
There was a problem hiding this comment.
Much better! Consider a type alias for Shape and Coord, for clarity and performance:
type Coord = SmallVec<[u64; 8]>;
type Shape = SmallVec<[u64; 8]>;
|