-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
FC + elementwise_add (Residual connection) #40834
Conversation
paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.h
Outdated
Show resolved
Hide resolved
paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.cc
Outdated
Show resolved
Hide resolved
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
@zhiqiu Could you please review changes at fc_mkldnn_op.cc related to ShareDataWith ? Changes are modeled after conv_mkldnn_op.cc where residual connections part is also using ShareDataWith(). We tried to use TensorCopy but there was significant performance degradation, so FC and CONV both are using ShareDataWith. We need your approval to pass CI. Feel free to ask questions |
@baoachun Please review |
Hi @Silv3S, well done!Could you please attach performance and accuracy comparison data for this pass? |
Hi, it is not suggested to |
Hi @baoachun, thank you! I updated PR description to provide performance comparison for affected models. I also prepared test which compares results between NativeConfig and AnalysisConfig, but I will need your help with uploading needed data.txt file to vit-ocr.tgz repository. |
Thank you for review @zhiqiu. Since we don't modify |
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
Thanks, LGTM |
Hi @XieYunshen, could you please approve setting timeout for new unit test? |
Continued in #41776 due to CI bug (non refreshing checks). Please approve second PR (code didn't change) |
PR types
Performance optimization
PR changes
OPs
Describe
Benchmarks
Test were conducted with oneDNN 2.5.4 ,
fc_mkldnn_pass
andfc_act_mkldnn_pass
were enabled: