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

[PIR] Enable program translator in dy2st mode #59152

Merged

Conversation

kangguangli
Copy link
Contributor

@kangguangli kangguangli commented Nov 20, 2023

PR types

Others

PR changes

Others

Description

Enable program translator in dy2st mode, but disable in following cases:

  1. program is loaded and run in dy2st mode
  2. cinn is enabled
  3. composite mechanism is enabled
  4. in some unit tests, this is temporarily, we hope them fixed before 12/10

Additional Modifications

  1. Add attribute in_pir_pt_mode for run_porgram op
  2. Introduce flag enable_pir_with_pt_in_dy2st

Both of them is used to control whether Pir is enabled in dy2st mode.

Others

Pcard-67164

Copy link

paddle-bot bot commented Nov 20, 2023

你的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.

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

@@ -14,6 +14,8 @@

#pragma once

#include <iostream>
Copy link
Contributor

Choose a reason for hiding this comment

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

这个应该是调试时忘记删除了吧

core._is_fwd_prim_enabled() or core._is_bwd_prim_enabled()
)
in_cinn_backend = self._backend == "CINN"
is_cinn_enabled = self._build_strategy.build_cinn_pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
is_cinn_enabled = self._build_strategy.build_cinn_pass
is_cinn_enabled = self._build_strategy.build_cinn_pass or self._backend == "CINN"

可以省去一个变量

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

可以考虑提个commit fix下或者合入后单独提PR

@kangguangli
Copy link
Contributor Author

Details

好的,下个PR修复。

@kangguangli kangguangli reopened this Nov 23, 2023
@kangguangli kangguangli merged commit 97382da into PaddlePaddle:develop Nov 23, 2023
28 checks passed
@kangguangli kangguangli deleted the enable_program_translator_in_dy2st branch November 23, 2023 10:00
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
* enable program translator in dy2st mode

* fix

* test

* test

* test

* test

* fix

* fix test_eager_run_program.py

* fix test_run_program_op

* fix test_gradname_parse partially

* fix test_bert_cinn

* skip failed cases

* skip jit.save

* fix test_run_program_op

* fix

* fix

* fix

* fix

* fix
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.

5 participants