Repository navigation
fix: use strided offsets in run_single_once when batch_contiguous is disabled - #612
Merged
Merged
Conversation
…disabled run_single_once always used contiguous offsets (buffer_size * i) regardless of the batch_contiguous flag. When batch_contiguous=False, the buffer is allocated with strided layout ((buffer_size + 1) * i), so RDMA writes were reading from wrong positions — each transfer's source overlapped gap bytes from adjacent segments, producing corrupted data on the target. Validation at _validate_rdma then correctly detected the mismatch (AssertionError at benchmark.py:705). Use strided offsets in run_single_once to match the buffer layout and validation expectations when batch_contiguous is disabled. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@TianDi101 Hi, Please let me know if there are any requests for this PR for review. |
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.
Summary
run_single_once()always used contiguous offsets (buffer_size * i) regardless ofbatch_contiguousbatch_contiguous=False, buffer is allocated with strided layout(buffer_size + 1) * i, causing each transfer to read from wrong positions (overlapping gap bytes)AssertionErroratbenchmark.py:705run_single_once()whenbatch_contiguous=FalseTest plan
--batch-contiguous— previously failed with AssertionError, now passes--batch-contiguous— still passes (no regression)