Rate this Page

NodeEventTracker#

class torch.fx.passes.splitter_base.NodeEventTracker(tracker_mode, dump_prefix)[source]#

Tracks node events during the splitter execution.

Warning

This API is experimental and is NOT backward-compatible.

add(node, desc, dep=None)[source]#

Add a new event to the tracker.

dump()[source]#

Function to be invoked at the end of the finder execution to printout tracked events specified by the mode.

print_all(writer=None)[source]#

Print all nodes in a list. @param writer: function to write to file. If None, use print.

print_node(node_name, recursive=False, tab='', writer=None)[source]#

Print a node and its events. @param recursive: if True, print nodes that caused the events on this current node. @param tab: Indentation for dependencies. @param writer: function to write to file. If None, use print.

to_dict()[source]#

Create dict dump on all events.

Return type:

dict[str, list[str]]