torchscope icon indicating copy to clipboard operation
torchscope copied to clipboard

Use jit tracing functionality for more accurate capture of all ops

Open rwightman opened this issue 6 years ago • 1 comments

Current impl based on forward hook only captures operations in the model that have been placed in Modules. If functional ops are used, they are missed.

I believe a solution would involve utilizing the functionality of the JIT tracing capability, by basing the analysis on the ScriptModule or graph output from the trace function.

rwightman avatar Jun 10 '19 18:06 rwightman

btw, this was implemented in https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/flop_count.py

ppwwyyxx avatar Oct 07 '20 07:10 ppwwyyxx