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

Method load_value

exir/verification/interpreter.py:181–195  ·  view source on GitHub ↗

Given an index in the value list, if value is `Uninitialized` or is a mutable object, like a Tensor List, calls `load` to load and initialize value into Interpreter's value_list. Args: `idx` : index in value lists that we want to load Returns: No returned v

(self, idx: int)

Source from the content-addressed store, hash-verified

179 return tensors
180
181 def load_value(self, idx: int) -> None:
182 """
183 Given an index in the value list, if value is `Uninitialized` or is a mutable object,
184 like a Tensor List, calls `load` to load and initialize value into Interpreter's value_list.
185
186 Args:
187 `idx` : index in value lists that we want to load
188
189 Returns: No returned values - value list is updated in place
190 """
191 # if instance of any mutable object, load regardless of being initialized
192 if isinstance(
193 self.execution_plan.values[idx].val, (TensorList, OptionalTensorList)
194 ) or isinstance(self._value_list[idx], Uninitialized):
195 self.load_from_value_list(idx)
196
197 def load_from_value_list(self, idx: int) -> None: # noqa
198 """

Callers 4

load_from_value_listMethod · 0.95
call_kernelMethod · 0.95
runMethod · 0.95
test_constant_bufferMethod · 0.95

Calls 1

load_from_value_listMethod · 0.95

Tested by 1

test_constant_bufferMethod · 0.76