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

Function node_io_str

backends/vulkan/utils.py:1854–1870  ·  view source on GitHub ↗
(node: torch.fx.Node)

Source from the content-addressed store, hash-verified

1852
1853
1854def node_io_str(node: torch.fx.Node) -> str:
1855 target = node.target
1856 if isinstance(target, EdgeOpOverload):
1857 assert isinstance(target, EdgeOpOverload)
1858 target_name = target.__name__
1859 elif isinstance(target, torch._ops.OpOverload):
1860 assert isinstance(target, torch._ops.OpOverload)
1861 target_name = target.name()
1862 else:
1863 target_name = str(target)
1864
1865 out_str = f"{get_node_val_str(node)} = {target_name}("
1866 for arg in node.args:
1867 out_str += get_arg_node_val_str(arg) + ", "
1868
1869 out_str += " ...)"
1870 return out_str
1871
1872
1873def update_program_state_dict(

Callers

nothing calls this directly

Calls 3

get_node_val_strFunction · 0.85
get_arg_node_val_strFunction · 0.85
nameMethod · 0.80

Tested by

no test coverage detected