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

Method __update_args_kwargs

torch/fx/node.py:426–441  ·  view source on GitHub ↗

This API is internal. Do *not* call it directly.

(self, new_args : Tuple['Argument', ...], new_kwargs : Dict[str, 'Argument'])

Source from the content-addressed store, hash-verified

424 self.meta["stack_trace"] = trace
425
426 def __update_args_kwargs(self, new_args : Tuple['Argument', ...], new_kwargs : Dict[str, 'Argument']):
427 """
428 This API is internal. Do *not* call it directly.
429 """
430 self._args = new_args
431 self._kwargs = new_kwargs
432
433 for old_use in self._input_nodes.keys():
434 old_use.users.pop(self)
435
436 self._input_nodes = {}
437 map_arg(self._args, self._input_nodes.setdefault)
438 map_arg(self._kwargs, self._input_nodes.setdefault)
439
440 for new_use in self._input_nodes.keys():
441 new_use.users.setdefault(self)
442
443 def __repr__(self) -> str:
444 if self._repr_fn:

Callers 6

__init__Method · 0.95
argsMethod · 0.95
kwargsMethod · 0.95
replace_input_withMethod · 0.95
replace_all_uses_withMethod · 0.80

Calls 4

map_argFunction · 0.70
keysMethod · 0.45
popMethod · 0.45
setdefaultMethod · 0.45

Tested by 1