# The "Ideal" PyTorch FLOP Counter (with \_\_torch\_dispatch\_\_)

**URL:** <https://dev-discuss.pytorch.org/t/the-ideal-pytorch-flop-counter-with-torch-dispatch/505>\
**Category:** performance\
**Created:** [February 18, 2022, 12:44am UTC](https://dev-discuss.pytorch.org/t/the-ideal-pytorch-flop-counter-with-torch-dispatch/505 "2022-02-18T00:44:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chillee](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/chillee/32/10_2.png) [@Chillee](https://dev-discuss.pytorch.org/u/Chillee)\
**Post date:** [October 20, 2022, 11:22pm UTC](https://dev-discuss.pytorch.org/t/the-ideal-pytorch-flop-counter-with-torch-dispatch/505/2 "2022-10-20T23:22:36Z")

</div>

This is an [updated version of the FLOP counter that uses TorchDispatchMode instead](https://pastebin.com/V3wATa7w)

---

_[View the full topic](https://dev-discuss.pytorch.org/t/the-ideal-pytorch-flop-counter-with-torch-dispatch/505)._
