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

Function instantiate_node_partition_mapping

torch/fx/passes/split_module.py:188–197  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

186 use_partition.dependencies.setdefault(defined)
187
188 def instantiate_node_partition_mapping(node):
189 partition_name = str(split_callback(node))
190
191 # add node to partitions
192 partition = partitions.get(partition_name)
193 if partition is None:
194 partitions[partition_name] = partition = Partition(partition_name)
195
196 partition.node_names.append(node.name)
197 node._fx_partition = partition_name
198
199 # Global State Nodes are nodes which by their global state effects,
200 # "taint" all downstream nodes while they are active.

Callers 1

split_moduleFunction · 0.85

Calls 3

PartitionClass · 0.70
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…