Repository navigation
fix(device): prevent recursion when copying DeviceInfo - #148
Merged
Merged
Conversation
Co-authored-by: Codex (GPT-6) <codex@openai.com> Signed-off-by: jinzhen.ljz <jinzhen.ljz@antgroup.com>
This was referenced Oct 15, 2026
Merged
jinzhen-lin
pushed a commit
that referenced
this pull request
Oct 16, 2026
…em (#149) The forward path builds a DeviceInfo on every call (LayerConfig.check_device, _resolve_use_pdl). Even after #148, fullgraph compile fails there because Dynamo cannot trace the extension's _DeviceInfo constructor. Return one shared instance per device from __new__, so traced code only reads an existing object, and add __reduce__ so copy/deepcopy/pickle resolve to the same device's instance instead of overwriting the current device's. Extend test_forward_fullgraph with int8 activations, which trace may_process_input and check_device. Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Code (Claude Opus 5.5) <noreply@anthropic.com>
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.
fix #147