-
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
[AutoParallel] Add reduce_all spmd rule #59411
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
// NOTE(zhonghui): There is no reduce_all type of ncclRedOp_t, just use | ||
// min to replace | ||
red_type = ncclMin; | ||
break; | ||
} |
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.
对的,从partial转换到replicate状态的时候,需要调用allReduce算子,无论是nccl还是gloo,都没有reduce_all这个type,只有sum、mean、max、min、prod这几种。这里用min来模拟bool类型的reduce_all操作,得到的结果是相同的。
opts->setReduceFunction( | ||
static_cast<void (*)(void*, const void*, const void*, size_t)>( | ||
&gloo::min<T>)); | ||
break; |
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.
同上
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
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
PR types
New features
PR changes
Others
Description
添加对reduce_all算子切分推导规则的支持、添加相关的单元测试
Pcard-73145