"refine kernel registrar"#6998
Merged
dzhwinter merged 11 commits intoPaddlePaddle:developfrom Dec 27, 2017
Merged
Conversation
reyoung
previously approved these changes
Dec 26, 2017
Collaborator
reyoung
left a comment
There was a problem hiding this comment.
Basically LGTM. I have to read more recent PRs to understand whole logic, but do not let this block the merge.
QiJune
previously approved these changes
Dec 27, 2017
paddle/framework/library_type.h
Outdated
| kMKLDNN = 1, | ||
| kCUDNN = 2, | ||
| kCPU = 3, | ||
| kGPU = 4 |
Contributor
Author
There was a problem hiding this comment.
Ok, will fix in next PR.
QiJune
reviewed
Dec 27, 2017
paddle/framework/library_type.h
Outdated
| kPlain = 0, | ||
| kMKLDNN = 1, | ||
| kCUDNN = 2, | ||
| kCPU = 3, |
Member
There was a problem hiding this comment.
Here kPlain means the default library both in CPU and CUDA. Since we already have CPUPlace and CUDAPlace, we have no need to add kCPU library and kCUDA library. <CPUPlace, kPlain> and <CUDAPlace, kPlain> are the most common Operator kernels.
Contributor
Author
There was a problem hiding this comment.
make sense. done.
QiJune
reviewed
Dec 27, 2017
| "REGISTER_OP_KERNEL must be called in global namespace"); \ | ||
| static ::paddle::framework::OpKernelRegistrar<place_class, __VA_ARGS__> \ | ||
| __op_kernel_registrar_##op_type##_##DEVICE_TYPE##__(#op_type); \ | ||
| __op_kernel_registrar_##op_type##_##DEVICE_TYPE##__(#op_type, \ |
Member
There was a problem hiding this comment.
DEVICE_TYPE here is actually LIBRARY_TYPE. We can fix it later.
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.
No description provided.