Repository navigation
Conversation
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.
Tensor packing currently checks the byte limit after inserting a tensor and uses
torch.cat(...).clone(). This can produce oversized groups from individually small tensors and unnecessarily allocate/copy another whole packed group.Split a nonempty group before an insertion would exceed
max_tensor_size, keeping individually oversized tensors isolated. Remove the post-catclone: concatenation already owns storage independently of the inputs, including single-input groups. Reconstruction metadata and dtype grouping remain unchanged.Fixes #128.
Validation:
bash ci/test_cpu.sh: 279 passed, 1 skipped in the local environment. Added the packing and CUDA IPC test files to this suite; the device-memory test skips without CUDA.The issue's 256 MiB CUDA reproduction measured a 512 MiB packing peak above live inputs with the old
cat().clone(), versus 256 MiB withcat()alone. This change targets allocation/copy overhead and the group-size contract; it does not change the CUDA IPC acknowledgement/lifetime protocol.