Update FlopCounterMode usage in throughput.py (#19926)

`mods` argument is not needed anymore for `FlopCounterMode`:
ffe506e853/torch/utils/flop_counter.py (L595-L596)
This commit is contained in:
Ivan Yashchuk 2024-05-30 19:14:56 +03:00 committed by GitHub
parent 95d6b6b9da
commit dffc0f96ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ def measure_flops(
raise ImportError("`measure_flops` requires PyTorch >= 2.1.")
from torch.utils.flop_counter import FlopCounterMode
flop_counter = FlopCounterMode(model, display=False)
flop_counter = FlopCounterMode(display=False)
with flop_counter:
if loss_fn is None:
forward_fn()