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

Add Code Generation for operators, op makers and argument mapping functions #41772

Merged
merged 39 commits into from
May 18, 2022

Conversation

iclementine
Copy link

@iclementine iclementine commented Apr 13, 2022

PR types

Others

PR changes

Others

Describe

  1. add api yaml vadilation for forward and backward apis;
  2. add code generation of operators, opmakers and argument mapping functions;
  3. add a default constructor for Scalar to avoid compilation error of backward nodes;
  4. add new_api.yaml and new_backward.yaml as a place holder for new apis, which are also included in c++ api generation and dygraph function generation.

For phi kernels to generate operator and argument mapping function for, put those api yaml in new_api.yaml and new_backward.yaml.

All the api entries in api.yaml, new_api.yaml, backward.yaml, 'new_backward.yaml` would be parsed and validated.

If there is any apis to genrate operator and argument mapping function, there would be a paddle/fluid/operators/generated_op.cc and paddle/phi/ops/compat/generated_sig.cc.

chenfeiyu and others added 30 commits March 18, 2022 15:43
paddle/CMakeLists.txt Outdated Show resolved Hide resolved
python/paddle/utils/code_gen/type_mapping.py Outdated Show resolved Hide resolved
python/paddle/utils/code_gen/type_mapping.py Outdated Show resolved Hide resolved
python/paddle/utils/code_gen/parse_api.py Outdated Show resolved Hide resolved
python/paddle/utils/code_gen/generate_op.py Outdated Show resolved Hide resolved
@iclementine iclementine requested a review from zyfncg April 18, 2022 06:56
zyfncg
zyfncg previously approved these changes Apr 20, 2022
python/paddle/utils/code_gen/type_mapping.py Outdated Show resolved Hide resolved
python/paddle/utils/code_gen/type_mapping.py Outdated Show resolved Hide resolved
@paddle-bot-old
Copy link

paddle-bot-old bot commented May 1, 2022

Sorry to inform you that 1b0720a's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@iclementine iclementine force-pushed the opmaker branch 2 times, most recently from c89069d to e333ea2 Compare May 10, 2022 07:24
@iclementine iclementine requested a review from zyfncg May 10, 2022 07:48
zyfncg
zyfncg previously approved these changes May 10, 2022
zyfncg
zyfncg previously approved these changes May 10, 2022
XiaoguangHu01
XiaoguangHu01 previously approved these changes May 12, 2022
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@iclementine iclementine dismissed stale reviews from XiaoguangHu01 and zyfncg via 8a000b3 May 18, 2022 02:51
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@iclementine iclementine merged commit e339d3c into PaddlePaddle:develop May 18, 2022
@iclementine iclementine deleted the opmaker branch May 19, 2022 10:55
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