Skip to content
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] optimize sharding stage1 tensor fusion save&load strategy #70309

Merged
merged 10 commits into from
Dec 26, 2024

Conversation

AndSonder
Copy link
Contributor

@AndSonder AndSonder commented Dec 18, 2024

PR Category

Auto Parallel

PR Types

Others

Description

  1. 为 tensor-fusion 添加开关 enable_stage1_tensor_fusion,该开关和动手对齐用于控制 tensor_fusion 的开关
  2. 添加非均匀 save&load 的方案:之前的方案中是将 tensor-fusion 的非均匀参数通信回到均匀状态,但是实际测试中发现 load 的过程中会引入较大的显存增加,非均匀 save&load 方案中给 tensor-fusion 场景下 slice 的参数 修改参数的名字后缀 _rankn 每张卡 slice 参数的名字不一样,这样可以保留每个参数的 metadata 信息,同时避免同名参数的通信。方案支持后添加了 save_unbalanced_param 参数默认打开表示使用非均匀 save&load的方案
  3. 优化了均匀 save&load 方案的显存,但是优化后还是会引入较多显存增长,所以默认不使用该方案
  4. 补充单测 case

相关 PR:

Pcard-76459

Copy link

paddle-bot bot commented Dec 18, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Dec 18, 2024
@AndSonder AndSonder changed the title [AutoParallel] add FLAGS_enable_sharding_stage1_tensor_fusion flag [AutoParallel] optimize sharding stage1 tensor fusion strategy Dec 24, 2024
@AndSonder AndSonder changed the title [AutoParallel] optimize sharding stage1 tensor fusion strategy [AutoParallel] optimize sharding stage1 tensor fusion save&load strategy Dec 24, 2024
@winter-wang winter-wang merged commit 8d97458 into PaddlePaddle:develop Dec 26, 2024
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants