-
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
MKLDNN layout: Gaussian random layout #11523
MKLDNN layout: Gaussian random layout #11523
Conversation
@luotao1 Could you continue the checking of this code, please. |
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.
Please add the unit test in test_gaussian_random_mkldnn_op.py
#include "paddle/fluid/platform/device_context.h" | ||
#include "paddle/fluid/platform/mkldnn_helper.h" | ||
|
||
#include "paddle/fluid/framework/eigen.h" |
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.
Are the including headers in line 15-line 24all needed? There are only two headers in gaussian_random_op.cc
Paddle/paddle/fluid/operators/gaussian_random_op.cc
Lines 15 to 16 in d00a043
#include <random> | |
#include "paddle/fluid/framework/op_registry.h" |
using mkldnn::primitive; | ||
using mkldnn::softmax_forward; | ||
using mkldnn::prop_kind; | ||
using mkldnn::stream; |
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.
Are line 28-37 all needed? please remove the unused one, such as mkldnn::softmax_forward
.
04d47b5
to
9d28678
Compare
9d28678
to
7b9aa60
Compare
@luotao1 Done |
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 very much!
The gaussian random operator of the MKLDNN significantly speed up the resnet model. The some function of mkldnn are used directly in this operator in order to get the better performance.