Repository navigation
Conversation
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.
An initial
get_state()call, including the one made by aThreadPrefetchDatasetIteratorwrapper, materializes interleave children with prefetch disabled.set_state()also leaves restored children stopped. The next interleave read then waits for its selected child before starting the other children, serializing multiprocessing worker startup across the first round of batches.Call the existing, idempotent
start_prefetch()method before waiting for the selected child. This starts all active lanes while keeping round-robin consumption and checkpoint state unchanged. Repeating the call also covers children stopped or replaced by restore.Add eight regression cases covering initial snapshots, zero-buffer wrappers, restore into an existing iterator, and restore into a fresh iterator, with debug mode on and off. Each lane waits until all lanes have started, then the test checks the exact output sequence. The snapshot case fails against unpatched 0.2.18 and all eight pass with the fix. Fourteen downstream placement/replay cases and a real three-process snapshot/restore check also pass.
📚 Documentation preview 📚: https://google-grain--1416.org.readthedocs.build/