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

[CINN]shape inference for logsumexp logcumsumexp linspace logspace min poisson repeat_interleave topk uniform #62800

Merged
merged 14 commits into from
Mar 27, 2024

Conversation

Xinyu302
Copy link
Contributor

@Xinyu302 Xinyu302 commented Mar 17, 2024

PR types

Function optimization

PR changes

OPs

Description

implement logcumsumexp min linspace logspace logsumexp logcumsumexp min poisson

Copy link

paddle-bot bot commented Mar 17, 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 Mar 17, 2024
Comment on lines 125 to 126
std::vector<symbol::DimExpr> out_dims;
out_dims.emplace_back(step);
Copy link
Contributor

Choose a reason for hiding this comment

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

std::vector<symbol::DimExpr> out_dims {step};


const auto &attributes = op->attributes();
int repeats = attributes.at("repeats").dyn_cast<pir::Int32Attribute>().data();
// what should I do if axis is null
Copy link
Contributor

Choose a reason for hiding this comment

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

axis (int,可选) – 指定对输入 x 进行运算的轴,若未指定,默认值为 None,使用输入 Tensor 的 flatten 形式。
应该是把 tensor 按照 1 维 vector进行处理、参考一下 infermeta ?

Copy link
Contributor

Choose a reason for hiding this comment

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

经过讨论确认、ir 中会插入 flatten op

Copy link
Contributor

@zhangbopd zhangbopd left a comment

Choose a reason for hiding this comment

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

可以加一下单测

@Xinyu302 Xinyu302 changed the title [CINN]implement logcumsumexp and min op shape inference by reuse [CINN]shape inference for pd.logsumexp pd.logcumsumexp pd.linspace pd.logspace pd.min pd.poisson pd.repeat_interleave pd.topk pd.uniform Mar 25, 2024
@Xinyu302 Xinyu302 changed the title [CINN]shape inference for pd.logsumexp pd.logcumsumexp pd.linspace pd.logspace pd.min pd.poisson pd.repeat_interleave pd.topk pd.uniform [CINN]shape inference for logsumexp logcumsumexp linspace logspace min poisson repeat_interleave topk uniform Mar 25, 2024
zhangbopd
zhangbopd previously approved these changes Mar 25, 2024
Copy link
Contributor

@zhangbopd zhangbopd left a comment

Choose a reason for hiding this comment

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

LGTM

lanxianghit
lanxianghit previously approved these changes Mar 25, 2024
@Xinyu302 Xinyu302 dismissed stale reviews from lanxianghit and zhangbopd via 0158c73 March 25, 2024 11:19
@PaddlePaddle PaddlePaddle deleted a comment from paddle-bot bot Mar 26, 2024
Copy link
Contributor

@zhangbopd zhangbopd left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangbopd zhangbopd merged commit 1dff8f8 into PaddlePaddle:develop Mar 27, 2024
30 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.

3 participants