-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MKLDNN Forward FullyConnected op cache #11611
Conversation
Hi, please add a test to ensure the caching works as expected |
Which version of mkldnn is suitable for this PR? |
The PR is based on release v0.14 version. Thanks. |
@azai91 could you help review |
ipFwd_pd.bias_primitive_desc(), bias->get_data_handle())); | ||
else | ||
this->bias->set_data_handle(bias->get_data_handle()); | ||
if (this->ipFwd == nullptr) |
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.
fix indent here?
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.
Have fixed.
if (param.no_bias) { | ||
MKLDNNStream::Get()->RegisterPrim(mkldnn::inner_product_forward( | ||
ipFwd_pd, *data_mem, *weight_mem, *out_mem.second)); | ||
FCFwd.ipFwd_pd.dst_primitive_desc(), req[fullc::kOut]); |
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.
pass in_data as last argument for CreateMKLDNNMem in case req is WriteInPlace
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.
Done.
approve conditional on adding that param to CreateMKLDNNMem so we can support kWriteInPlace. |
* Enable primitive allocation cache for FullyConnected * Enable primitive allocation cache for FullyConnected * fix indent and pass in_data as last argument for CreateMKLDNNMem * fix indent and pass in_data as last argument for CreateMKLDNNMem
Description
Enable primitive allocation cache for FullyConnected, separate from PR #11301
@zheng-da , @pengzhao-intel, @ZhennanQin
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments