Skip to content

[SOT] Add env variable FLAGS_parameters_persistent_mode_in_dy2st for dy2st #2779

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

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

0x3878f
Copy link
Contributor

@0x3878f 0x3878f commented Jul 9, 2025

Add one new variable for dy2st: FLAGS_parameters_persistent_mode_in_dy2st

cc @SigureMo

Copy link

paddle-bot bot commented Jul 9, 2025

Thanks for your contribution!

@@ -961,6 +961,9 @@ def _setting_environ_variables(self):
"FLAGS_pir_interpreter_record_stream_for_gc_cache":
os.getenv("FLAGS_pir_interpreter_record_stream_for_gc_cache",
default="1"),
"FLAGS_parameters_persistent_mode_in_dy2st":
os.getenv("FLAGS_parameters_persistent_mode_in_dy2st",
default="1"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个参数在哪会用到

Copy link
Contributor Author

Choose a reason for hiding this comment

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

在框架的转静和run_program 里用到,在非推理场景下默认是关闭的

Copy link
Member

@SigureMo SigureMo Jul 9, 2025

Choose a reason for hiding this comment

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

只在动转静场景会有影响,用于将参数持久化在执行器 scope 中,避免每次 share 到 scope 产生的开销

详情见 PaddlePaddle/Paddle#73620

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

标题可以明确下是哪个环境变量

@0x3878f 0x3878f changed the title [SOT] Add env variable for dy2st [SOT] Add env variable FLAGS_parameters_persistent_mode_in_dy2st for dy2st Jul 9, 2025
@gongshaotian
Copy link
Collaborator

gongshaotian commented Jul 9, 2025

麻烦在环境变量的文档里也说明一下,方便后续维护

@YuanRisheng YuanRisheng merged commit 1d8af7a into PaddlePaddle:develop Jul 10, 2025
3 checks passed
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.

4 participants