Skip to content

Commit

Permalink
Allow for sympy.Expr in tensor lowering in inductor (pytorch#103678)
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>

Pull Request resolved: pytorch#103678
Approved by: https://github.com/voznesenskym
  • Loading branch information
ezyang authored and pytorchmergebot committed Jun 16, 2023
1 parent dad29f9 commit 39ba2e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/_inductor/lowering.py
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ def tensor(data, *, dtype=None, device=None, layout=None, pin_memory=False):
else:
dtype = dtype or torch.get_default_dtype()

if isinstance(data, sympy.Symbol):
if isinstance(data, sympy.Expr):
ranges = []

def inner_fn(index):
Expand Down

0 comments on commit 39ba2e6

Please sign in to comment.