Skip to content

Commit 7586fd6

Browse files
committed
nit
1 parent fdd43df commit 7586fd6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

torch/_inductor/scheduler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4254,11 +4254,8 @@ def filter_symbols(
42544254
res: OrderedSet[sympy.Symbol] = OrderedSet()
42554255
for s in candidate_symbols:
42564256
symplified_s = V.graph.sizevars.simplify(s)
4257-
# skip when s is simplified to an Integer
4258-
if isinstance(symplified_s, sympy.Symbol):
4259-
res.add(symplified_s)
4260-
else:
4261-
assert isinstance(symplified_s, sympy.Integer)
4257+
# use free_symbols only when s is simplified to an Integer or expr
4258+
res.update(symplified_s.free_symbols)
42624259

42634260
return res
42644261

0 commit comments

Comments
 (0)