-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
support ernie trt-int8 for inference #32232
Conversation
Thanks for your contribution! |
} | ||
} | ||
|
||
bool enable_int8 = mul0_op_desc->HasAttr("enable_int8"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是和上面重复了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉了,感谢~
n_output, weight.get(), bias.get()); | ||
nvinfer1::ILayer* fc_layer = nullptr; | ||
if (enable_int8) { | ||
CHECK(op_desc.HasAttr("out_threshold")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用PADDLE_ENFORCE吧,给出报错信息
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,感谢~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
Others
Describe
support trt-int8 inference for ernie
通过load_inference_model fake 量化测试精度结果为0.7786