Skip to content

Fix deleting destination buffers during reshard.#1430

Merged
copybara-service[bot] merged 1 commit intomainfrom
nicogrande/fix-delete-buffers
Apr 27, 2026
Merged

Fix deleting destination buffers during reshard.#1430
copybara-service[bot] merged 1 commit intomainfrom
nicogrande/fix-delete-buffers

Conversation

@NicoGrande
Copy link
Copy Markdown
Collaborator

@NicoGrande NicoGrande commented Apr 24, 2026

This PR cleans up some of the buffer deletion code in the transfer_state_directly codepath and adds additional guardrails to avoid deleting aliased tensors.

Additionally this PR introduces new unittests for previously untested codepaths like deleting buffers when reshard chunking is explicitly enabled.

Checklist

  • I have added all the necessary unit tests for my change.
  • I have verified that my change does not break existing code and all unit tests pass.
  • I have added all appropriate doc-strings/documentation.
  • My PR is based on the latest changes of the main branch (if unsure, rebase the code).
  • I have signed the Contributor License Agreement.
  • I have followed Contribution Guidelines.

@NicoGrande NicoGrande force-pushed the nicogrande/fix-delete-buffers branch from d65c713 to dda8673 Compare April 24, 2026 20:47
@NicoGrande NicoGrande marked this pull request as ready for review April 24, 2026 23:28
@copybara-service copybara-service Bot merged commit 1dfa07c into main Apr 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants