Skip to content

Batch tensor I/O in checkpoint serialization - #79

Merged
CanReader merged 2 commits into
masterfrom
land/checkpoint-bulk-io
Nov 12, 2026
Merged

CanReader merged 2 commits into
masterfrom
land/checkpoint-bulk-io

Conversation

@CanReader

Copy link
Copy Markdown
Owner

What this changes

save_tensors converts each tensor to bytes once and writes it with one call; load_tensors reads a tensor's bytes with one call and decodes them. The on-disk format is unchanged.

Why

This is #76 rebased across #74, which moved the body of save_tensors into the atomic-write closure and left #76 conflicting. The contributor's commit is kept as is with their authorship; the second commit is cargo fmt. Landing it from a branch in this repository because the fork's branch cannot be updated from here.

Closes #54.

How it was verified

  • cargo test passes
  • cargo clippy --all-targets -- -D warnings is clean
  • Ran cuda_parity on a GPU
  • Trained an example in --release
  • No GPU here, CUDA side not runtime tested

Serialize unit tests, robustness and safetensors suites pass locally on the rebased result; CI runs the rest.

Checklist

  • Every new or changed backward rule has a gradcheck case
  • Every new kernel has a cuda_parity case
  • tensor/ops and autograd/ops still mirror each other
  • Public items have /// docs

@CanReader
CanReader merged commit 0b8b588 into master Nov 12, 2026
12 checks passed
@CanReader
CanReader deleted the land/checkpoint-bulk-io branch November 12, 2026 10:18
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.

Checkpoints are written and read 4 bytes at a time

2 participants