feat(replay): support MPS gpu-resident replay - #898
Merged
Conversation
This was referenced Aug 4, 2026
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
GPUResidentReplayPipelineto run on Apple MPS while keeping the packed CPU replay authoritative.training.replay_pipeline=gpu_resident; the default remainscpu_pinned_double_buffer. It adds one full replay allocation on the learner device.Linked Work
Validation
make check(covered bymake test-all)uv run pytest -m "not slow"(covered by the completemake test-allgate)Commands actually run:
Results:
17 passed, 13 skipped.1630 passed, 59 skipped, 268 deselected, 1 xfailed; Ruff, mypy, Pyright, and benchmark smoke passed.en/3-deployment/2-sim_to_sim/7-config_guard.md.Apple Silicon replay benchmark
Hardware and parameters:
g1_walk_flat/ MuJoCo default replay shapeThe isolated replay work was about 2.46x faster for the resident scheme in this run. This is benchmark evidence for the replay path only, not an end-to-end training-speed or convergence claim.
Impact
training.replay_pipeline=gpu_residentis explicitly selectedArtifacts
/tmp/unilab-issue894-replay-placement-{mps,cpu}.json; parameters and medians are included aboveChecklist