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

[ Dy2Static | Controlflow ]While + Cond support for python container. #45105

Merged

Conversation

2742195759
Copy link
Contributor

@2742195759 2742195759 commented Aug 12, 2022

PR types

Others

PR changes

Others

Describe

While support for python container. It is convenient to convert more dynamic graph codes into static graphs.

support the following case:

for i in tensor:
    a = {'a': 1, 'b': 2, 'c': 3}

and

  a = {"a": 3, "b": 4, "c": 9}                                                                                                                                                                                    
  for i in x:                                                                                           
      a = a  # make the a become loop vars. a will be convert into {'a', Tensor, 'b': Tensor, 'c': Tensor}                                                                            
      a['a'] = 12   

It is convenient to convert more dynamic graph codes into static graphs.
@paddle-bot
Copy link

paddle-bot bot commented Aug 12, 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.

@paddle-bot
Copy link

paddle-bot bot commented Aug 12, 2022

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@2742195759 2742195759 changed the title [ Dy2Static | Controlflow ]While support for python container. [ Dy2Static | Controlflow ]While + Cond support for python container. Aug 15, 2022
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.

LGTM

@Aurelius84 Aurelius84 merged commit f8f66ec into PaddlePaddle:develop Aug 24, 2022
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