Skip to content

Commit

Permalink
Update torch version to 2.5.1 (pytorch#8452)
Browse files Browse the repository at this point in the history
  • Loading branch information
qihqi authored and rpsilva-aws committed Dec 6, 2024
1 parent 61a70f5 commit 5d575a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions experimental/torch_xla2/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-f https://download.pytorch.org/whl/torch
torch==2.4.0; sys_platform == 'darwin' # macOS
torch==2.4.0+cpu; sys_platform != 'darwin' # Non-macOS (CPU-only), like on TPU
torch==2.5.1; sys_platform == 'darwin' # macOS
torch==2.5.1+cpu; sys_platform != 'darwin' # Non-macOS (CPU-only), like on TPU
ruff~=0.3.5
5 changes: 3 additions & 2 deletions experimental/torch_xla2/torch_xla2/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ def _build_symbolic_constraints(symbol_name, torch_constraint):
symbol = sympy.Symbol(symbol_name)
if torch_constraint.lower != 2:
constraints.append(symbol >= torch_constraint.lower)
if not torch_constraint.upper.is_infinite:
from sympy.core.singleton import S
if not torch_constraint.upper.is_infinite and torch_constraint.upper is not S.IntInfinity:
constraints.append(symbol <= torch_constraint.upper)

return tuple(sympy.pretty(c, use_unicode=False) for c in constraints)

def _build_symbolic_shape(sym, constraint, free_symbols):
Expand Down

0 comments on commit 5d575a8

Please sign in to comment.