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

[IR] Auto gen fused op #56585

Merged

Conversation

zhangbo9674
Copy link
Contributor

PR types

New features

PR changes

Others

Description

基于 fused_ops.yaml 及 fused_backward.yaml 自动生成 fused 类算子定义。

Other

Pcard-67164

@zhangbo9674 zhangbo9674 merged commit 0d47f38 into PaddlePaddle:develop Aug 24, 2023
const std::vector<const MetaTensor*>& seq_lengths,
const std::vector<const MetaTensor*>& src_mask,
const std::vector<const MetaTensor*>& gather_index,
const MetaTensor& rotary_pos_emb,
Copy link
Contributor

Choose a reason for hiding this comment

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

为啥这个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.

这里的修改已经与@zyfncg 确认,修改原因是:
(1)在算子定义中后5个输入参数(如rotary_pos_emb)的类型是 Tensor,而不是 vector,因此这里将 infer_meta 从const std::vector<const MetaTensor*>& 规范为const MetaTensor&;
(2)此外,后5个输入参数在 infer-meta 函数中也没有被用到。

BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
* add code

* fix bug

* fix bug
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