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

[GLCC]Part-4: fix testcases for dy2st PyLayer #57633

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

MarioLulab
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Original requirements

It is expected that the PyLayer mechanism in the dynamic graph of the Paddle can interoperate with the @to_staitc of the Paddle's dynamic to static, supporting the custom layer of the PyLayer in the model to be perceived by the @to_static and correctly generating the static graph Program, and supporting the training of the dynamic to static and the exporting for inference.

So our main objective is to Enable PyLayer to Support @to_static. In this PR, we fix some testcases for dy2st PyLayer.

Related issues

【Feature Request】 PyLayer 功能支持动转静 @to_static 🚀: #54120

Related PR

[GLCC]Part-1: Add pylayer op to Support @to_static: #56108

[GLCC]Part-2: @to_static support for PyLayer: #56531

[GLCC]Part-3: Support jit.save and jit.load for pylayer op: #57066

Project Records

https://github.com/MarioLulab/GLCC2023-Paddle-Record

Main works

  1. Fix code not conforming to code specifications in the previous PR.
  2. Add a switch of enabling wrapper test_and_compare_with_new_irin the function check_save_inference_model of test_save_inference_model.py.

@MarioLulab MarioLulab marked this pull request as ready for review September 22, 2023 05:53
@paddle-bot paddle-bot bot added the contributor External developers label Sep 22, 2023
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

A nest structure of tensors in PaddlePaddle is tensor(s), or tuple of tensors, or
list of tensors.
``forward_fn`` and ``backward_fn`` should return a nest structure of Variables.
A nest structure of Variables in PaddlePaddle is Variable(s), or tuple of Variables, or
Copy link
Contributor

@Aurelius84 Aurelius84 Sep 25, 2023

Choose a reason for hiding this comment

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

这里其实不需要改为Variable的,因为我们在用户端正在「去Variable化」,用户了解到的都是Tensor,可以单独再提一个PR 吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,会在下一个 pr 进行修复~

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 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 7bc7fad into PaddlePaddle:develop Sep 25, 2023
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
* add testcase load_inference_model

* polish code for last pr

* delete annots

* fix docs of static_pylayer
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
* add testcase load_inference_model

* polish code for last pr

* delete annots

* fix docs of static_pylayer
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* add testcase load_inference_model

* polish code for last pr

* delete annots

* fix docs of static_pylayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants