Skip to content

Commit dffc0f9

Browse files
authored
Update FlopCounterMode usage in throughput.py (#19926)
`mods` argument is not needed anymore for `FlopCounterMode`: https://github.com/pytorch/pytorch/blob/ffe506e85350a505be5698c871d50b2fc614406d/torch/utils/flop_counter.py#L595-L596
1 parent 95d6b6b commit dffc0f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/fabric/utilities/throughput.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def measure_flops(
296296
raise ImportError("`measure_flops` requires PyTorch >= 2.1.")
297297
from torch.utils.flop_counter import FlopCounterMode
298298

299-
flop_counter = FlopCounterMode(model, display=False)
299+
flop_counter = FlopCounterMode(display=False)
300300
with flop_counter:
301301
if loss_fn is None:
302302
forward_fn()

0 commit comments

Comments
 (0)