MCPcopy Create free account
hub / github.com/pytorch/executorch / NodeMetadata

Class NodeMetadata

exir/pass_base.py:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99
100class NodeMetadata:
101 def __init__(self, data: Dict[str, Any]) -> None:
102 self.data: Dict[str, Any] = data.copy()
103
104 def __getitem__(self, key: str) -> NodeMetadataValue:
105 return self.data[key]
106
107 def __setitem__(self, key: str, value: NodeMetadataValue) -> NodeMetadataValue:
108 if key in PROTECTED_KEYS:
109 raise RuntimeError(f"Could not override node key: {key}")
110 self.data[key] = value
111
112 def __contains__(self, key: str) -> bool:
113 return key in self.data
114
115 def copy(self) -> "NodeMetadata":
116 return NodeMetadata(self.data.copy())
117
118
119class ProxyValue:

Callers 15

placeholderMethod · 0.90
outputMethod · 0.90
call_operatorMethod · 0.90
call_getitemMethod · 0.90
meta_without_qparamsFunction · 0.90
call_operatorMethod · 0.90
call_operatorMethod · 0.90
call_operatorMethod · 0.90
call_operatorMethod · 0.90
test_call_mapMethod · 0.90

Calls

no outgoing calls

Tested by 14

test_call_mapMethod · 0.72
_build_matmul_graphMethod · 0.72
_build_linear_graphMethod · 0.72
_build_conv1d_graphMethod · 0.72
_build_conv2d_graphMethod · 0.72
_build_softmax_graphMethod · 0.72
_build_add_graphMethod · 0.72
_build_bmm_graphMethod · 0.72
_build_relu_graphMethod · 0.72
_build_addmm_graphMethod · 0.72
_build_add_relu_graphMethod · 0.72