Skip to content

add pipeline support#167

Closed
yuejiewang wants to merge 2 commits into
flagos-ai:mainfrom
yuejiewang:pipeline
Closed

add pipeline support#167
yuejiewang wants to merge 2 commits into
flagos-ai:mainfrom
yuejiewang:pipeline

Conversation

@yuejiewang

@yuejiewang yuejiewang commented May 26, 2025

Copy link
Copy Markdown
Collaborator

pipeline only tested with ring allgather;
cost model is modified based on single-step operations.

@yuejiewang yuejiewang force-pushed the pipeline branch 2 times, most recently from e622a84 to 17882cb Compare May 28, 2025 09:32
Comment thread flagcx/core/c2c_algo.cc Outdated
clusterOffset * sendCount_, clusterOffset * sendCount_,
comm_->cluster_sizes[i] * sendCount_, 2, postHomoFuncCommOp);
if (nsteps_ > 1) {
size_t step = comm_->cluster_ids[i] + comm_->nclusters - clusterId_;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里需要取余么?

Comment thread flagcx/core/c2c_algo.cc Outdated
clusterInterRankList_[clusterId_][0] - (rank_ - homoMyRank_),
clusterOffset * sendCount_, clusterOffset * sendCount_,
comm_->cluster_sizes[i] * sendCount_, 2, postHomoFuncCommOp);
if (nsteps_ > 1) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nsteps_可以设为成员变量,nSteps_

Comment thread flagcx/core/c2c_algo.cc Outdated
comm_->nclusters;
postHomoFuncPipeline_[step].emplace_back(
clusterInterRankList_[clusterId_][i] - (rank_ - homoMyRank_),
it->offset_, it->offset_, it->count_, 0, postHomoFuncCommOp);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里应该homoType设为2?

Comment thread flagcx/core/c2c_algo.cc Outdated
postHomoFuncPipeline_[step].emplace_back(
clusterInterRankList_[clusterId_][0] - (rank_ - homoMyRank_),
clusterOffset * sendCount_, clusterOffset * sendCount_,
comm_->cluster_sizes[i] * sendCount_, 0, postHomoFuncCommOp);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

一样的,设为2?

@yuejiewang yuejiewang force-pushed the pipeline branch 3 times, most recently from f1de3d4 to 0d7788f Compare June 3, 2025 14:31
* cluster-level pipelined ring allgather

* use different streams for het and hom operations

* adjust cost model (w/o pipeline)
@yuejiewang yuejiewang closed this Jun 12, 2025
@yuejiewang yuejiewang deleted the pipeline branch July 16, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants