Skip to content

Route FPDT and checkpoint writer pins through accelerator pin_memory - #8257

Open
sfc-gh-truwase wants to merge 1 commit into
masterfrom
tjruwase/pin-memory-route-fpdt-writer
Open

Route FPDT and checkpoint writer pins through accelerator pin_memory#8257
sfc-gh-truwase wants to merge 1 commit into
masterfrom
tjruwase/pin-memory-route-fpdt-writer

Conversation

@sfc-gh-truwase

Copy link
Copy Markdown
Collaborator

Summary

  • Route FPDT SequenceChunk and backward zero-chunk pins through get_accelerator().pin_memory(), pinning only when the chunk is on-accelerator (avoid pin-then-discard on CPU inputs).
  • Route FastFileWriter AIO buffer through accelerator pin with make_copy=False, and fall back to Tensor.pin_memory() when the CPU accelerator torch path no-ops so DeepNVMe can still skip bounce buffers.

Test plan

  • pre-commit run --files on touched paths (already run locally)
  • FPDT path smoke if available
  • Checkpoint FastFileWriter / AIO write with default torch backend
  • Optional: DS_PIN_MEMORY_BACKEND=native confirms writer buffer is pinned / managed for AIO

Use get_accelerator().pin_memory for FPDT CPU chunks and FastFileWriter
AIO buffers, with make_copy=False for empty destinations and a torch
pin fallback when the CPU accelerator no-ops.

Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@sfc-gh-truwase
sfc-gh-truwase requested a review from delock August 16, 2026 02:53
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.

1 participant