Remove dead get_shape_groups (#120813)

Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120813
Approved by: https://github.com/albanD
This commit is contained in:
Edward Z. Yang
2024-03-06 18:36:45 +00:00
committed by PyTorch MergeBot
parent 18d574a07a
commit 6490441d8f

View File

@ -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}