-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Move layer norm to phi #40193
Merged
phlrain
merged 26 commits into
PaddlePaddle:develop
from
phlrain:move_layer_norm_to_phi
Mar 17, 2022
Merged
Move layer norm to phi #40193
Changes from 14 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6064b49
update
phlrain 09a40fa
fix bugs; test=develop
phlrain 3b26bf0
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 6f2833d
update; test=develop
phlrain 4b1cb8a
fix test compile error; test=develop
phlrain 13d4751
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain f533350
fix cpu compile error; test=develop
phlrain 521f190
fix test error; test=develo
phlrain a1af264
fix layer_norm_op plugin error; test=develop
phlrain 79e3f4b
fix error; test=develop
phlrain 6ebdc83
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 9504426
fix test bug; test=develop
phlrain 4fcad84
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 7bbbec0
Merge branch 'develop' into move_layer_norm_to_phi
phlrain 334427c
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 88d15dc
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 09bf412
update; test=develop
phlrain 63bc6b5
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 7dd3e9d
polish code; test=develop
phlrain 39eb6ff
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain c527480
fix bugs; test=develop
phlrain 7b3681a
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain e46bd87
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 72a18c9
remove unused depency; test=develop
phlrain fa6c9e6
Merge branch 'develop' of /~https://github.com/PaddlePaddle/Paddle into…
phlrain 871f90b
polish code; test=develop
phlrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ limitations under the License. */ | |
|
||
#include <time.h> | ||
|
||
#include <iostream> | ||
#include <random> | ||
#include <vector> | ||
|
||
|
@@ -192,7 +193,6 @@ struct TestFusedLayernormResidualDropoutBias { | |
residual_vec[i * cols + j] + out2[i * cols + j]; | ||
} | ||
} | ||
|
||
LayerNorm<T>(scale_vec, layernorm_bias_vec, correct_out, &correct_means, | ||
&correct_vars, &correct_layernorm_out, epsilon, rows, cols, | ||
*ctx); | ||
|
@@ -264,6 +264,7 @@ struct TestFusedLayernormResidualDropoutBias { | |
|
||
template <typename T> | ||
static void BaseTest(const bool is_fp16 = false) { | ||
std::cerr << "1" << std::endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个调试信息删除 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
const int rows = 16; | ||
T default_diff = !is_fp16 ? static_cast<T>(1e-4) : static_cast<T>(1e-2); | ||
for (auto cols : {16, 17}) { | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
下边的调试信息删除了,这里也要删除
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