Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refitting An Engine: What is the “tmp_weight” ? #2620

Closed
lg920810 opened this issue Jan 31, 2023 · 4 comments
Closed

Refitting An Engine: What is the “tmp_weight” ? #2620

lg920810 opened this issue Jan 31, 2023 · 4 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@lg920810
Copy link

Description

When I use refitter.get_all_weights() in engine refitting, it appears "tmp_weight".

'ctr_hidden_0.weight', 'ctr_hidden_0.bias', 'tmp_weight_9', 'tmp_weight_8'

the layer in onnx file corresponding to the tensorrt engine is "Gemm->BatchNormalizaiton->Relu", where 'ctr_hidden_0.weight', 'ctr_hidden_0.bias' in Gemm. I think (Gemm,BN,Relu) has already fused a Conv, but I do not know what is tmp_weight_9 and tmp_weight_8?

Environment

TensorRT Version: 8.5.1.7

@zerollzeng
Copy link
Collaborator

@pranavm-nvidia Do you know? thanks!

@zerollzeng zerollzeng added the triaged Issue has been triaged by maintainers label Feb 1, 2023
@pranavm-nvidia
Copy link
Collaborator

Those are typically created by the ONNX parser in cases where the TensorRT requires weights but the corresponding ONNX op uses an attribute instead. In this case it's most likely the scale/shift for the BN layer.

@lg920810
Copy link
Author

lg920810 commented Feb 3, 2023

Those are typically created by the ONNX parser in cases where the TensorRT requires weights but the corresponding ONNX op uses an attribute instead. In this case it's most likely the scale/shift for the BN layer.

I think you are right, I will verify it. Thanks~

@ttyio
Copy link
Collaborator

ttyio commented Mar 28, 2023

Closing since no activity for more than 3 weeks, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

4 participants