2 ms·
haha, yes, but that requires you to modify existing code to do so (which isn't always possible!). There might also be other things you want to do (like add pro
by chillee 5y ago
haha, yes, but that requires you to modify existing code to do so (which isn't always possible!).
There might also be other things you want to do (like add profiling after each op) that would be tedious to do manually, but can easily automated with FX (https://pytorch.org/tutorials/intermediate/fx_profiling_tutorial.html https://pytorch.org/tutorials/intermediate/fx_profiling_tuto...).
Another example is the recent support from torchvision for extracting intermediate feature activations (https://github.com/pytorch/vision/releases/tag/v0.11.0 https://github.com/pytorch/vision/releases/tag/v0.11.0). Like, sure, it was probably possible to refactor all of their code to enable users to specify extracting an intermediate feature, but it's much cleaner to do with FX.
- davidatbu 5y agoThanks @chillee! Your comments are helpful.