Compare commits

...

1 Commits

Author SHA1 Message Date
9220409522 Remove unused test code
ghstack-source-id: 8d6fad8d8f59a12a1711649cdd4558f23025a45c
Pull Request resolved: https://github.com/pytorch/pytorch/pull/160823
2025-08-16 11:23:52 -07:00

View File

@ -9,28 +9,6 @@ from torch._dynamo.testing import extract_graph_and_tracker
from torch.utils._pytree import tree_map from torch.utils._pytree import tree_map
def get_nodes_by_name(graph, names):
nodes = []
for node in graph.nodes:
if node.name in names:
nodes.append(node)
return nodes
unique_ind = 0
def track_same_nodes(names, graph, region_tracker):
global unique_ind
unique_ind += 1
# find nodes in graph with names and track them
# as if they were at the same code location
nodes = get_nodes_by_name(graph, names)
for node in nodes:
region_tracker.track_node("x", unique_ind, node)
class GraphRegionTrackerTests(TestCase): class GraphRegionTrackerTests(TestCase):
def setUp(self): def setUp(self):
self.exit_stack = contextlib.ExitStack() self.exit_stack = contextlib.ExitStack()