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

[static code gen] support composite grad maker code gen #37

Merged
merged 23 commits into from
Jan 8, 2023

Conversation

Charles-hit
Copy link
Collaborator

PR types

New features

PR changes

Others

Describe

support composite grad maker code gen.

zyfncg and others added 22 commits December 29, 2022 06:28
Copy link
Owner

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

some comments

# "${generated_argument_mapping_path}"
# "${generated_static_argument_mapping_path}"
# "${generated_sparse_argument_mapping_path}")
set(generated_static_files
Copy link
Owner

Choose a reason for hiding this comment

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

why this? This is duplicated with line 159

ops=ops,
backward_ops=backward_ops,
op_dict=op_dict,
composite_gen_flag=True,
Copy link
Owner

Choose a reason for hiding this comment

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

Add TODO here to support all static code gen with composite

std::vector<paddle::optional<paddle::experimental::Tensor>> outputs_opt;
std::vector<framework::VarDesc*> outputs_descs =
this->MultiForwardOutput(name);
outputs_opt.resize(outputs_descs.size());
Copy link
Owner

Choose a reason for hiding this comment

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

No need for additional copy

@JiabinYang JiabinYang merged commit 63b30e9 into JiabinYang:prim_paddle Jan 8, 2023
@Charles-hit Charles-hit deleted the static_composite_gen branch February 28, 2023 07:12
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