Skip to content

Conversation

mikethegoblin
Copy link
Contributor

  • modified runtime.cc to include flagcx implementation
  • modified compilation scripts to optionally compile with FlagCX

Copy link

paddle-bot bot commented Aug 1, 2025

Thanks for your contribution!

@@ -811,17 +892,32 @@ C_Status XcclCommInitRank(size_t nranks,
C_CCLRootId *unique_id,
size_t rank,
C_CCLComm *comm) {
#if defined(PADDLE_WITH_FLAGCX)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件里的修改大部分都一样,是不是通过一个map或者脚本,将对应的变量或函数进行替换,只有差异化的地方用宏来控制。
这样如果其他后端修改,这个脚本的方法大部分也可以复用

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已将flagcx相关实现放到单独的文件runtime_flagcx.cc,这个文件的实现如果日后需要适配其他后端可直接复用

Copy link
Collaborator

@yongqiangma yongqiangma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@liym27 liym27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yongqiangma yongqiangma merged commit 58dd9c8 into PaddlePaddle:develop Sep 1, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants