Skip to content

Conversation

@kangguangli
Copy link
Contributor

@kangguangli kangguangli commented Dec 29, 2022

PR types

Others

PR changes

OPs

Describe

The support of InterpreterCore was added for control flow ops in #45696 and #47573.
These changes were tested with model paddlenlp.transformers.InferTransformerModel. The running scripts comes from here.
Since the test results show that running control flow ops with InterpreterCore has no negative effect, we decide to make this a default behavior by set Flag_control_flow_use_new_executor 's initial value to true.

Test Results

Speed
execution time of a step Mean Std
InterpreterCore 3.765255368136345 0.25985690535277695
Executor 3.7777641466323364 0.3428938842422705
Accuracy

We printed the output finished_sequence of every step in both conditions and compared them.
The output was exactly same no matter which executor was used.

Memory Usage

We printed max memory usage during execution of first ten steps:

max_memory_reserved
Unit:MB InterpreterCore Executor
1 26932.67236328125 28292.859619140625
2 26932.67236328125 28292.859619140625
3 26932.67236328125 28292.859619140625
4 26932.67236328125 28292.859619140625
5 26932.67236328125 28292.859619140625
6 26932.67236328125 28292.859619140625
7 26932.67236328125 28292.859619140625
8 26932.67236328125 28292.859619140625
9 26932.67236328125 28292.859619140625
10 26932.67236328125 28292.859619140625

@paddle-bot
Copy link

paddle-bot bot commented Dec 29, 2022

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

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@kangguangli kangguangli merged commit 0f9e2b1 into PaddlePaddle:develop Jan 3, 2023
@kangguangli kangguangli deleted the replace_control_flow_executor branch January 3, 2023 08:42
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.

3 participants