-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Call c10 layer_norm from PyTorch #13488
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
Closed
Closed
Conversation
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
Differential Revision: D12894386 Differential Version: 62356209
Differential Revision: D12894385 Differential Version: 62356210
This was referenced Nov 1, 2018
Differential Revision: D12894385 Differential Version: 62477482
This was referenced Nov 2, 2018
Differential Revision: D12894385 Differential Version: 62672001
This was referenced Nov 6, 2018
Differential Revision: D12894385 Differential Version: 62761603
dzhulgakov
reviewed
Nov 7, 2018
// TODO cudnn_enabled | ||
caffe2::ops::LayerNorm::Cache cache; | ||
caffe2::CPUContext context; | ||
Tensor output = at::empty({0}); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2::Tensor caffe2_output = to_caffe2(output); | ||
caffe2::Tensor caffe2_output_mean = to_caffe2(output_mean); | ||
caffe2::Tensor caffe2_output_stdev = to_caffe2(output_stdev); | ||
c10::Dispatcher<caffe2::ops::LayerNorm>::call(caffe2_input, &caffe2_output, &caffe2_output_mean, &caffe2_output_stdev, axis, (float)epsilon, &cache, static_cast<caffe2::BaseContext*>(&context)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
closing because of ghexport issues, will reopen new PR for this. |
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.
Stack:
:white_circle: #13528 Move IdWrapper to c10/util 💚
:white_circle: #13529 Remove typeid -> Half dependency 💛
:white_circle: #13530 Move typeid to c10/util 💛
:white_circle: #13531 Fix include paths for typeid.h 💛
:white_circle: #13532 Move c10 dispatcher prototype to c10/ 💚
:white_circle: #13609 Move intrusive_ptr to c10/util 💛
:white_circle: #13610 Fix include paths for intrusive_ptr 💛
:white_circle: #13533 Register caffe2 layer norm with c10 dispatcher 💛
:black_circle: #13488 Call c10 layer_norm from PyTorch 💛
Differential Revision: D12894385