Skip to content

Commit

Permalink
To be technically correct, need to check the in-place _ ver of op
Browse files Browse the repository at this point in the history
  • Loading branch information
rwightman committed Nov 28, 2024
1 parent 7c32d3b commit e3e434b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion timm/optim/lion.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def lion(
if foreach is None:
try:
# cannot do foreach if this overload doesn't exist when caution enabled
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum.overloads()
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum_.overloads()
except:
foreach = False

Expand Down
2 changes: 1 addition & 1 deletion timm/optim/nadamw.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def nadamw(
if foreach is None:
try:
# cannot do foreach if this overload doesn't exist when caution enabled
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum.overloads()
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum_.overloads()
except:
foreach = False

Expand Down

0 comments on commit e3e434b

Please sign in to comment.