Skip to content

Commit

Permalink
remove useless pipeline buffer between cpu to stage 0 (#8484)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
chengtbf and mergify[bot] authored Jun 24, 2022
1 parent 3ea445a commit ca9fd64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oneflow/core/job_rewriter/pipeline_buffer_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Maybe<void> PipelineBufferPass::Apply(const OpGraph& op_graph, JobBuilder* job_b
const int64_t dst_stage_id = GetStageIdHint(dst_node);
if (src_node->parallel_desc().device_type() == DeviceType::kCPU
&& dst_node->parallel_desc().device_type() == DeviceType::kCUDA) {
if (src_stage_id == 0 && (dst_stage_id == max_stage_id || dst_stage_id == 0)) {
if (src_stage_id == 0 && dst_stage_id == max_stage_id) {
TryInsertOrUseBufferOpToDstNode(edge, total_stage_num * 2, &buffer_op_name2op_conf,
&buffer_op_name2parallel_conf, &mut_op_name2conf);
return;
Expand Down

0 comments on commit ca9fd64

Please sign in to comment.