mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
dynamo tracing perf: Guard slots: 51.76 -> 51.34 (#143060)
See #143056 for overall docs. This PR: Add slots to Guard Pull Request resolved: https://github.com/pytorch/pytorch/pull/143060 Approved by: https://github.com/jansel ghstack dependencies: #143066, #143056, #143058, #143059
This commit is contained in:
committed by
PyTorch MergeBot
parent
e87f07d3b8
commit
52f31cc238
@ -28,6 +28,7 @@ from typing import (
|
||||
)
|
||||
|
||||
from torch.utils import _pytree as pytree
|
||||
from torch.utils._backport_slots import dataclass_slots
|
||||
from torch.utils._traceback import CapturedTraceback, format_frame
|
||||
from torch.utils.weak import WeakTensorKeyDictionary
|
||||
|
||||
@ -169,6 +170,7 @@ class ShapeGuard(NamedTuple):
|
||||
sloc: SLoc
|
||||
|
||||
|
||||
@dataclass_slots
|
||||
@dataclasses.dataclass
|
||||
class Guard:
|
||||
# originating_source is the source that called the make_guard method to
|
||||
|
||||
Reference in New Issue
Block a user