MCPcopy Create free account
hub / github.com/pytorch/pytorch / MutableLocal

Class MutableLocal

torch/_dynamo/variables/base.py:85–99  ·  view source on GitHub ↗

Marker used to indicate this (list, iter, etc) was constructed in local scope and can be mutated safely in analysis without leaking state.

Source from the content-addressed store, hash-verified

83
84
85class MutableLocal(MutableLocalBase):
86 """
87 Marker used to indicate this (list, iter, etc) was constructed in
88 local scope and can be mutated safely in analysis without leaking
89 state.
90 """
91
92 def __init__(self):
93 super().__init__(MutableLocalSource.Local)
94
95 def __hash__(self):
96 return id(self)
97
98 def __eq__(self, other):
99 return self is other
100
101
102def _is_top_level_scope(scope_id):

Callers 15

BUILD_LISTMethod · 0.85
BUILD_SETMethod · 0.85
BUILD_LIST_UNPACKMethod · 0.85
BUILD_MAPMethod · 0.85
BUILD_MAP_UNPACKMethod · 0.85
BUILD_CONST_KEY_MAPMethod · 0.85
inline_call_Method · 0.85
call_functionMethod · 0.85
expand_list_likeMethod · 0.85
_call_iter_tuple_listMethod · 0.85
call_custom_dictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…