[Data] Add optional blocksize_elements to BlockingParameters#344
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an element-count-based blocking option to make blocked dataset sizing more predictable across element types/dimensions, while preserving the existing byte-based configuration.
Changes:
- Extended
svs::data::BlockingParameterswith optionalblocksize_elements(takes precedence when present). - Updated blocked
SimpleDataconstruction to computeblocksize_fromblocksize_elementswhen provided, otherwise fall back toblocksize_bytes. - Added unit tests (with a recording allocator) to demonstrate
blocksize_bytespitfalls and validate deterministic behavior withblocksize_elements.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| include/svs/core/data/simple.h | Adds blocksize_elements and updates blocked SimpleData to prefer explicit element-based block sizing. |
| tests/svs/core/data/block.cpp | Adds tests and a recording allocator to validate new block sizing behavior and memory prediction differences. |
Member
Author
|
/intelci |
ibhati
approved these changes
Jun 16, 2026
c408423 to
9522baf
Compare
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the flexibility and predictability of blocked data structures by introducing explicit control over the number of elements per block (
blocksize_elements) in addition to the existing byte-based blocking (blocksize_bytes). It also improves test coverage to verify the new behavior and edge cases.Blocking parameter improvements:
blocksize_elementsfield to theBlockingParametersstruct, allowing users to specify the number of elements per block directly. If set, this takes precedence overblocksize_byteswhen determining block size. (include/svs/core/data/simple.h)Testing and validation:
blocksize_bytesfor memory prediction.blocksize_elementsis set, including checks for correct block size selection and memory consumption predictions.(
tests/svs/core/data/block.cpp)