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]migrate increment addmm multinomial cholesky InferShapes to phi #39913

Merged
merged 2 commits into from
Feb 25, 2022

Conversation

Aganlengzi
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

1.Migrate increment addmm multinomial cholesky InferShapes to phi
2.Move MultinomialFunctor to paddle/phi/kernels/funcs
3.Make changes for comments in #39858

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

chenwhql
chenwhql previously approved these changes Feb 25, 2022
Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM,细节建议后续再完善一下

output_dims.push_back(x_dims[0]);
output_dims.push_back(y_dims[1]);

out->set_dims(make_ddim(output_dims));
Copy link
Contributor

Choose a reason for hiding this comment

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

建议infermeta里一并set一下dtype,在原来体系里这边是一个漏洞

Copy link
Contributor Author

Choose a reason for hiding this comment

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

了解,这几个我都加下.

std::vector<T> cumulative_probs(num_categories);

std::uniform_real_distribution<T> dist(0, 1);
auto gen_ptr = paddle::framework::DefaultCPUGenerator();
Copy link
Contributor

Choose a reason for hiding this comment

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

这个相关fluid头文件可以移除,写法也可以改一下,建议把dev_ctx传进来用,不然内部就使用单例了
62c30ae66b7c599b664d3f5e59ad4567

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, done.

zyfncg
zyfncg previously approved these changes Feb 25, 2022
"X's shape[-2] = %d and shape[-1] = %d.",
dims[rank - 2],
dims[rank - 1]));
out->set_dims(x.dims());
Copy link
Contributor

Choose a reason for hiding this comment

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

这里也可以再设置下dtype

Copy link
Contributor Author

Choose a reason for hiding this comment

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

多谢,这几个我都加下。

@Aganlengzi Aganlengzi dismissed stale reviews from zyfncg and chenwhql via 8c692e7 February 25, 2022 03:15
@Aganlengzi Aganlengzi merged commit 87b903a into PaddlePaddle:develop Feb 25, 2022
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