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
I'm using torch.onnx.export(..., export_params=False) to avoid inlining all the weights of the model as constants in the IR. For the most part this works as expected, i.e. i get all the model parameters as inputs in the main func.func signature. However, for some models there are extra.
I've figured out that some of the extras are from model.buffers(). I can even get parameters or buffers by name since the func has func arg attributes like onnx.name = "L__self___transformer_h_0_attn_c_attn_bias". But then there are the outliers I can't figure out how to get. For example I get an extra arg that has attribute onnx.name = "onnx::MatMul_1270". Where do args like this come from? Is there a simple way to extract all needed inputs (in the right order) from either the model object or the fx graph?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using
torch.onnx.export(..., export_params=False)
to avoid inlining all the weights of the model as constants in the IR. For the most part this works as expected, i.e. i get all the model parameters as inputs in the mainfunc.func
signature. However, for some models there are extra.I've figured out that some of the extras are from
model.buffers()
. I can even get parameters or buffers by name since the func has func arg attributes likeonnx.name = "L__self___transformer_h_0_attn_c_attn_bias"
. But then there are the outliers I can't figure out how to get. For example I get an extra arg that has attributeonnx.name = "onnx::MatMul_1270"
. Where do args like this come from? Is there a simple way to extract all needed inputs (in the right order) from either the model object or the fx graph?Any guidance is appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions