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

[SOT] Skip load store pass if DUP in opcode #62358

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Mar 4, 2024

PR types

Bug fixes

PR changes

Others

Description

load store pass 中跳过包含 DUP 的情况

比如目前代码 pass 前后 diff 如下

             -1 LOAD_FAST                         (resume_26_stack_0)                     
-            -1 LOAD_FAST                         (resume_26_stack_1)                     
             22 DUP_TOP                                                                   
             24 STORE_FAST                    4   (kernel_size)                           
-            26 STORE_FAST                    5   (stride)                                

 221         28 LOAD_GLOBAL                   3   (F)                                     
             30 LOAD_ATTR                     4   (avg_pool2d)                            
             32 LOAD_FAST                     2   (xi)                                    
             34 LOAD_FAST                     4   (kernel_size)                           
-            36 LOAD_FAST                     5   (stride)                                
+            36 LOAD_FAST                         (resume_26_stack_1)    
             38 LOAD_CONST                    4   (('kernel_size', 'stride'))             
             40 CALL_FUNCTION_KW              3   (3)                                     
             42 STORE_FAST                    2   (xi)                                    

原来代码里 DUP_TOP 的是 resume_26_stack_1,pass 后 DUP_TOP 的就是 resume_26_stack_0

Pcard-67164

@SigureMo SigureMo requested a review from gouzil March 4, 2024 06:09
Copy link

paddle-bot bot commented Mar 4, 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.

@SigureMo SigureMo merged commit 2ab2994 into PaddlePaddle:develop Mar 4, 2024
30 checks passed
@SigureMo SigureMo deleted the sot/skip-load-store-pass-if-dup-in-opcode branch March 4, 2024 16:02
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