You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the parameters registered inside thop do not account for the model's device. This makes buffers made by thop to be in CPU, while model parameters are in GPU, which leads to an error. Thus, it requires a frequent call to move the model to cuda during a forward pass (if flops of a model are changing in case of a technique that prunes the model).
It would be nice if initialization of all buffers (inside all hooks) are initialized from a device, that can be passed inside the profile function. Alternatively, one could also get the device from the model/input passed to the profile function.
The text was updated successfully, but these errors were encountered:
All of the parameters registered inside
thop
do not account for the model's device. This makes buffers made bythop
to be in CPU, while model parameters are in GPU, which leads to an error. Thus, it requires a frequent call to move the model to cuda during a forward pass (if flops of a model are changing in case of a technique that prunes the model).It would be nice if initialization of all buffers (inside all hooks) are initialized from a device, that can be passed inside the
profile
function. Alternatively, one could also get the device from themodel
/input
passed to theprofile
function.The text was updated successfully, but these errors were encountered: