Add docblock for TrackedFake (#154396)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/154396
Approved by: https://github.com/laithsakka
ghstack dependencies: #154400, #154398
This commit is contained in:
bobrenjc93 2025-05-28 12:46:07 -07:00 committed by PyTorch MergeBot
parent d311b79c12
commit ed348e7026

View File

@ -2129,10 +2129,13 @@ class SubclassSymbolicContext(StatefulSymbolicContext):
self.inner_contexts = {} self.inner_contexts = {}
# Tracks the sources of all fake tensors we wrap in Dynamo.
# Used by shape guard computation.
@dataclass @dataclass
class TrackedFake: class TrackedFake:
"""
Tracks the sources of all fake tensors we wrap in Dynamo.
Used by shape guard computation.
"""
fake: Union[FakeTensor, SymInt] fake: Union[FakeTensor, SymInt]
source: Source source: Source
symbolic_context: Optional[SymbolicContext] symbolic_context: Optional[SymbolicContext]