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

[PHI]Standardise some C++ API #47385

Merged
merged 6 commits into from
Oct 31, 2022

Conversation

YuanRisheng
Copy link
Contributor

@YuanRisheng YuanRisheng commented Oct 26, 2022

PR types

Others

PR changes

Others

Describe

标准化如下C++ API接口,使其与Python API对齐:
addmm
put_along_axis
graph_send_uv
brelu
crop_tensor
gaussian_random
graph_send_recv
graph_send_ue_recv
后续还会继续对接口标准化,此PR是系列工作的第一个PR

@paddle-bot
Copy link

paddle-bot bot commented Oct 26, 2022

你的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.

jiahy0825
jiahy0825 previously approved these changes Oct 28, 2022
Copy link
Contributor

@jiahy0825 jiahy0825 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -2056,7 +2056,7 @@
backward : psroi_pool_grad

- op : put_along_axis
args : (Tensor arr, Tensor index, Tensor value, int axis, str reduce)
args : (Tensor arr, Tensor indices, Tensor values, int axis, str reduce)
Copy link
Contributor

Choose a reason for hiding this comment

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

反向中的参数名也需要调整下吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done,3q very much

@@ -145,15 +145,15 @@
func : fft_r2c
backward : fft_r2c_grad

- op : graph_send_uv
- op : send_uv
Copy link
Contributor

@zyfncg zyfncg Oct 28, 2022

Choose a reason for hiding this comment

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

这里生成的静态图 op 名也会从 graph_send_uv 变为了 send_uv, 得考虑是否有不兼容的问题

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done , 3q your revew

Comment on lines 509 to 524
void SendUERecvInferMeta(const MetaTensor& x,
const MetaTensor& y,
const MetaTensor& src_index,
const MetaTensor& dst_index,
const std::string& message_op,
const std::string& reduce_op,
const IntArray& out_size,
MetaTensor* out,
MetaTensor* dst_count);

void SendUVInferMeta(const MetaTensor& x,
const MetaTensor& y,
const MetaTensor& src_index,
const MetaTensor& dst_index,
const std::string& message_op,
MetaTensor* out);
Copy link
Contributor

@zyfncg zyfncg Oct 28, 2022

Choose a reason for hiding this comment

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

infermeta函数按字典序再调整下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

const IntArray& out_size,
MetaTensor* out,
MetaTensor* dst_count);
void SendURecvInferMeta(const MetaTensor& x,
Copy link
Contributor

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

const IntArray& out_size,
MetaTensor* out,
MetaTensor* dst_count) {
void SendURecvInferMeta(const MetaTensor& x,
Copy link
Contributor

@zyfncg zyfncg Oct 31, 2022

Choose a reason for hiding this comment

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

这个函数位置好像没调整

Copy link
Contributor Author

Choose a reason for hiding this comment

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

下个pr修复一下

Copy link
Contributor

@ZzSean ZzSean left a comment

Choose a reason for hiding this comment

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

LGTM for CI-OP-Benchmark

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

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.

6 participants