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] Add test for PIR refined recompute #9679

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

waliwali777
Copy link
Contributor

@waliwali777 waliwali777 commented Dec 23, 2024

PR types

Others

PR changes

Others

Description

Judge refined_ops_patterns training args.
Add test for PIR refined recompute.

yaml 文件中的调用举例:

 enable_auto_parallel: 1
 to_static: 1
 recompute: 1
 refined_ops_patterns:
        - {main_ops: [flash_attn], num: -1, pre_ops: [], suf_ops: []}
        - {main_ops: [matmul], num: 2, pre_ops: [], suf_ops: [add]}

python命令行参数中的调用举例

python -u -m paddle.distributed.launch \
                    --gpus "0,1,2,3" \
                    --log_dir $case_log_dir \
                    run_pretrain_auto.py \
                    --to_static \
                    --enable_auto_parallel 1 \ 
                    --recompute 1 \
                    --refined_ops_patterns '[{"main_ops":["matmul"],"num":-1,"pre_ops":["softmax"],"suf_ops":[]}]' \
                   ...

Copy link

paddle-bot bot commented Dec 23, 2024

Thanks for your contribution!

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 52.49%. Comparing base (a52035f) to head (57da8d7).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/trainer/auto_training_args.py 33.33% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9679      +/-   ##
===========================================
+ Coverage    52.46%   52.49%   +0.03%     
===========================================
  Files          727      723       -4     
  Lines       115028   114327     -701     
===========================================
- Hits         60353    60020     -333     
+ Misses       54675    54307     -368     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waliwali777 waliwali777 force-pushed the add_refined_recompute_test branch 2 times, most recently from 72ea11c to 8b31f4b Compare December 27, 2024 03:30
@waliwali777 waliwali777 force-pushed the add_refined_recompute_test branch 3 times, most recently from 3226de9 to 04cf542 Compare January 3, 2025 07:14
@@ -762,6 +762,7 @@ class TrainingArguments:
"If a parameter is omitted, it defaults to `xxx:0`."
},
)
refined_ops_patterns: str = field(default=None, metadata={"help": "The pattern of refined recompute."})
Copy link
Collaborator

Choose a reason for hiding this comment

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

如果这个暂时不能合并的话,要不先放到 paddlenlp/trainer/auto_training_args.py 中?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@waliwali777 waliwali777 force-pushed the add_refined_recompute_test branch from 441bf79 to 57da8d7 Compare January 6, 2025 04:03
Copy link
Collaborator

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

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

LGTM

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