From 6490441d8feec56cd49ac6cfa641efd5fb874ce9 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 6 Mar 2024 18:36:45 +0000 Subject: [PATCH] Remove dead get_shape_groups (#120813) Signed-off-by: Edward Z. Yang Pull Request resolved: https://github.com/pytorch/pytorch/pull/120813 Approved by: https://github.com/albanD --- torch/fx/experimental/symbolic_shapes.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/torch/fx/experimental/symbolic_shapes.py b/torch/fx/experimental/symbolic_shapes.py index 9122dd9ebebc..98b2f48a6905 100644 --- a/torch/fx/experimental/symbolic_shapes.py +++ b/torch/fx/experimental/symbolic_shapes.py @@ -3403,13 +3403,6 @@ class ShapeEnv: return '\n'.join(f" - {guard.expr}{format_tb(guard.stack)}" for guard in self.guards) - def get_shape_groups(self): - """Returns lists of symbols grouped by the expression they are equivalent to""" - shape_groups = collections.defaultdict(list) - for k, v in self.replacements.items(): - shape_groups[v].append(k) - return shape_groups - def bound_sympy(self, expr: sympy.Expr, size_oblivious: bool = False) -> ValueRanges: """Given a sympy expression, computes a ValueRanges bound for what values it can be""" var_to_range = {x: self.var_to_range.get(x, None) for x in expr.free_symbols}