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

Unify operator yamls directory #64446

Merged
merged 17 commits into from
May 21, 2024

Conversation

huangjiyi
Copy link
Member

@huangjiyi huangjiyi commented May 20, 2024

PR Category

Others

PR Types

Others

Description

  • 规范用于自动生成算子定义的 yaml 文件目录
  • 规范前:
paddle/fluid/pir/dialect/operator/ir
  |-- onednn.yaml
  |-- ops.yaml
  |-- ops_backward.yaml
  |-- ops_onednn_extra.yaml
  `-- update_ops.yaml
...
paddle/phi/api/yaml
  |-- backward.yaml
  |-- fused_backward.yaml
  |-- fused_ops.yaml
  |-- legacy_backward.yaml
  |-- legacy_ops.yaml
  |-- op_compat.yaml
  |-- op_version.yaml
  |-- ops.yaml
  |-- sparse_backward.yaml
  |-- sparse_ops.yaml
  |-- static_backward.yaml
  |-- static_ops.yaml
  |-- strings_ops.yaml
  `-- tensor_operants.yaml
  • 规范后:

其中 paddle/phi/ops/yaml 目录下的是动静一致的算子,inconsistent 子目录下的是新 IR 下动静不一致的算子 (其中 rename 了几个 yaml 文件方便理解),legacy 子目录下则是面向旧 IR 静态图的算子,后续会随着旧 IR 进行退场

paddle/phi/ops/yaml
  |-- legacy    # 即将废弃的旧 IR 算子定义
  |   |-- backward_exclude.yaml
  |   |-- ops_exclude.yaml
  |   |-- static_backward.yaml
  |   `-- static_ops.yaml
  |-- inconsistent    # 新 IR 下动静不一致的算子定义
  |   |-- dygraph_backward.yaml
  |   |-- dygraph_ops.yaml
  |   |-- onednn_static.yaml
  |   |-- onednn_ops_extra.yaml
  |   |-- static_backward.yaml
  |   |-- static_ops.yaml
  |   `-- update_ops.yaml
  |-- backward.yaml
  |-- fused_backward.yaml
  |-- fused_ops.yaml
  |-- op_compat.yaml
  |-- op_version.yaml
  |-- ops.yaml
  |-- sparse_backward.yaml
  |-- sparse_ops.yaml
  `-- strings_ops.yaml
  • 另外对解析后的 yaml 文件规范到了 build 的对应目录下:
build/paddle/phi/ops/yaml
  |-- legacy
  |   |-- static_backward.parsed.yaml
  |   `-- static_ops.parsed.yaml
  |-- inconsistent
  |   |-- dygraph_backward.parsed.yaml
  |   |-- dygraph_ops.parsed.yaml
  |   |-- static_backward.parsed.yaml
  |   |-- static_ops.parsed.yaml
  |   `-- update_ops.parsed.yaml
  |-- backward.parsed.yaml
  |-- fused_backward.parsed.yaml
  |-- fused_ops.parsed.yaml
  |-- ops.parsed.yaml
  |-- sparse_backward.parsed.yaml
  `-- sparse_ops.parsed.yaml

Copy link

paddle-bot bot commented May 20, 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.

@paddle-bot paddle-bot bot added the contributor External developers label May 20, 2024
@zhangbo9674
Copy link
Contributor

个人的建议,可以酌情采纳:(1)这个 new 目录是不是直接叫 inconsistent_ops 更直观一些?(2) onednn.yaml 应该是只有 pir 静态图特有的吧,是不是叫 static_onednn.yaml更直观?

@huangjiyi
Copy link
Member Author

个人的建议,可以酌情采纳:(1)这个 new 目录是不是直接叫 inconsistent_ops 更直观一些?(2) onednn.yaml 应该是只有 pir 静态图特有的吧,是不是叫 static_onednn.yaml更直观?

已处理,new 目录改为了 inconsistent,onednn.yaml 改为了 onednn_static,yaml

Aurelius84
Aurelius84 previously approved these changes May 21, 2024
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.

Great work!

zhangbo9674
zhangbo9674 previously approved these changes May 21, 2024
zyfncg
zyfncg previously approved these changes May 21, 2024
@huangjiyi huangjiyi dismissed stale reviews from zyfncg, zhangbo9674, and Aurelius84 via 5a612c8 May 21, 2024 03:27
zhangbo9674
zhangbo9674 previously approved these changes May 21, 2024
@phlrain phlrain self-requested a review May 21, 2024 03:31
phlrain
phlrain previously approved these changes May 21, 2024
heavyrain-lzy
heavyrain-lzy previously approved these changes May 21, 2024
Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

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

LGTM

@huangjiyi huangjiyi dismissed stale reviews from heavyrain-lzy, phlrain, and zhangbo9674 via 506fad1 May 21, 2024 03:47
@chen2016013 chen2016013 merged commit a8e29ef into PaddlePaddle:develop May 21, 2024
32 checks passed
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.

8 participants