-
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
support multi node in heterps #31102
Conversation
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
@@ -386,3 +386,27 @@ def __init__(self): | |||
def _transpile_startup_program(self): | |||
block = self.startup_program.global_block() | |||
block.append_op(type='c_comm_init_all', attrs={'ring_id': 0}) | |||
|
|||
|
|||
class MultiThread(GradAllReduce): |
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.
需要在minimize中添加MultiThread的使用
@@ -111,6 +173,12 @@ class HeterComm { | |||
CustomGradMerger merger_; | |||
int topo_aware_{1}; | |||
std::vector<std::vector<Path>> path_; | |||
std::vector<LocalStorage> storage_; | |||
int feanum_{1800 * 2048}; | |||
int multi_node_{1}; |
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.
写成可配置的形式
@@ -54,7 +54,14 @@ void HeterPs::show_one_table(int gpu_num) { comm_->show_one_table(gpu_num); } | |||
|
|||
void HeterPs::push_sparse(int num, FeatureKey* d_keys, | |||
FeaturePushValue* d_grads, size_t len) { | |||
comm_->push_sparse(num, d_keys, d_grads, len, opt_); | |||
// comm_->push_sparse(num, d_keys, d_grads, len, opt_); | |||
comm_->push_sparse_multi_node(num, d_keys, d_grads, len, opt_); |
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.
需要加入单机多机的判断,走push_sparse 或 push_sparse_multi_node
* push multi node * multi node * MultiThread * remove log * solve bug in 30829
PR types
New features
PR changes
Others
Describe
support multi node in heterps mode