-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Semi-Auto]Add master_grad for semi-auto parallel in AMP #58706
Conversation
9d26bd5
to
dbdd187
Compare
b1f295a
to
c95983f
Compare
from paddle import nn | ||
|
||
|
||
class TestSimpleNetWithAmpForSemiAutoParallel(TestSimpleNetForSemiAutoParallel): |
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.
和amp那个单测重名,且内容重合度也比较高,如果主要是master_grad参数的变化,要不要整理复用一下代码
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.
i will merge them together.
test/amp/test_amp_master_grad.py
Outdated
@@ -54,7 +54,7 @@ def check_results( | |||
) | |||
self.assertEqual( | |||
int(op_list['transfer_dtype'].split(',')[0]), | |||
total_steps + total_steps * 2, | |||
total_steps + total_steps * 2 + 2, # add 2 for adam's master grad |
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.
这里+2要不要再多写一些注释
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.
ok, i fill fix it.
11d61bd
to
fd5e31f
Compare
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.
LGTM for set_tests_properties(test_semi_auto_parallel_in_framework PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 300)
…e#58706) * fix confilct * fix confilct * fix confilct * fix confilct * fix confilct
…e#58706) * fix confilct * fix confilct * fix confilct * fix confilct * fix confilct
PR types
Breaking changes
PR changes
Others
Description
[Distributed]Add utest for semi-auto parallel
Pcard-73145