Summary:
Currently, when profiler computes flops/activation for individual modules, it assume the forward function takes a single position argument
def forward(self, x):
....
In some modules, such as the MatMul module used in visual transformer (https://fburl.com/diffusion/0tubwixm), the forward function takes more thane one arguments
def forward(self, A, B):
....
Therefore, this diff updates the profiler to support multiple positional inputs in the forward function.
Summary: Currently, when profiler computes flops/activation for individual modules, it assume the forward function takes a single position argument def forward(self, x): ....
In some modules, such as the
MatMul
module used in visual transformer (https://fburl.com/diffusion/0tubwixm), the forward function takes more thane one arguments def forward(self, A, B): ....Therefore, this diff updates the profiler to support multiple positional inputs in the
forward
function.Differential Revision: D25214757