PyTorch reverted pull request #187194, which had introduced usage of C++20's std::latch to simplify waiting. The revert was performed by pytorchmergebot on behalf of huydhn. The change was yanked because it caused failures in some internal builds. The reverted commit is 19afbb4.
This PR addresses two issues in PyTorch Dynamo when using pre-existing generator objects in set methods. First, it introduces a test-only config (`enable_compile_time_generator_exhaustion`) that exhausts the generator at compile time and guards its identity with an ID_MATCH guard, avoiding a graph break. Second, it fixes set polyfills (union, difference, intersection, symmetric_difference) that previously iterated non-set operands multiple times, silently dropping elements from one-shot iterables; they now materialize operands exactly once. The `set_isdisjoint` loop order was also corrected to match CPython's lazy, short-circuiting behavior. These changes remove six expected-failure sentinels from the CPython test suite under `PYTORCH_TEST_WITH_DYNAMO=1`.
Processing is temporarily unavailable. The original item should be reviewed from its source link. This fallback keeps the item compatible with the processing contract.
PyTorch merged pull request #187210, which updates the SourcelessBuilder to support DistributedDataParallel (DDP) models. The change was co-authored by Claude Opus 4.8 (1M context) and approved by rtimpe. No further implementation details are provided in the release note.
This commit introduces index coercion in PyTorch Dynamo for range() arguments and slice members. The change improves Dynamo’s ability to handle Python’s dynamic integer types during tracing, preventing type mismatches in compiled graphs. Authored by guilhermeleobas, it is associated with issue/PR #18. It is a targeted compiler enhancement for PyTorch’s just-in-time compilation pipeline.
PyTorch Dynamo previously lacked support for collections.deque.__init__, causing graph breaks when re-initializing an existing deque. This commit adds handling in DequeVariable.call_method by mirroring CPython's deque_init: it resets maxlen, clears the deque, and extends it with the provided iterable. The implementation also validates maxlen as a non-negative integer, matching CPython's error behavior. This change removes an expected-failure sentinel for CPython 3.13's test_basics, which now passes. The fix improves Dynamo's coverage of Python built-in types, reducing friction for tracing code that uses deques.