[MKL-DNN] Thread-Safety for MKL-DNN reusing Part 1#17965
Merged
luotao1 merged 8 commits intoPaddlePaddle:developfrom Jun 11, 2019
Merged
[MKL-DNN] Thread-Safety for MKL-DNN reusing Part 1#17965luotao1 merged 8 commits intoPaddlePaddle:developfrom
luotao1 merged 8 commits intoPaddlePaddle:developfrom
Conversation
|
@LeoZhao-Intel Please help to review this PR. Thanks! |
Contributor
|
I test it on face deployment service, it works successfully. |
Contributor
LeoZhao-Intel
left a comment
There was a problem hiding this comment.
Basically LGTM.
Few comments for Part2:
- By key generation with threadid, is lock still needed?
- Current softmax grad op is dependent on softmax in mkldnn implementation, unlike transpose2 does, can we remove this tight pairing?
| mkldnn::prop_kind fwd_prop_kind) { | ||
| const std::string key_conv_pd = key_ + "@conv_pd"; | ||
| // Conv PD has to be passed to Grad op that | ||
| // may be exxecuted by diffrent thread, hence |
luotao1
approved these changes
Jun 11, 2019
Contributor
luotao1
left a comment
There was a problem hiding this comment.
LGTM! Please refine #17965 (review) in next PR!
Contributor
|
@jczaja @jianhang-liu @LeoZhao-Intel I test this PR on content DNN. It runs successfully on multi-thread with transpose_mkldnn_op. |
Contributor
|
I did similar test before, both transpose2/transpose2_grad on mkldnn can work well in ParallelExecutor. |
Contributor
Author
|
@luotao1 Thanks for letting us know on your findings |
This was referenced Jun 19, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adress the issue reported in #17611 by making Reusing concept thread safe. Currently only
part of ops were adapted. After sorting out an issue #17960 additional PR for Relu, pooling and INT8 prims will be raised.
@luotao1 I have updated this branch couple of hours ago, so please double check if this PR works for you. If ContentDNN is not working then it means that Relu and other missing ops has to be updated as well. Anyway please share error messages if any.