Skip to content

Commit e3e434b

Browse files
committed
To be technically correct, need to check the in-place _ ver of op
1 parent 7c32d3b commit e3e434b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

timm/optim/lion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def lion(
143143
if foreach is None:
144144
try:
145145
# cannot do foreach if this overload doesn't exist when caution enabled
146-
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum.overloads()
146+
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum_.overloads()
147147
except:
148148
foreach = False
149149

timm/optim/nadamw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def nadamw(
171171
if foreach is None:
172172
try:
173173
# cannot do foreach if this overload doesn't exist when caution enabled
174-
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum.overloads()
174+
foreach = not caution or 'Scalar' in torch.ops.aten._foreach_maximum_.overloads()
175175
except:
176176
foreach = False
177177

0 commit comments

Comments
 (0)