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

【Prim】Add multiply,expand,div vjp rules #49831

Merged
merged 25 commits into from
Jan 17, 2023

Conversation

cxxly
Copy link
Contributor

@cxxly cxxly commented Jan 14, 2023

PR types

Others

PR changes

Others

Describe

  • add multiply,expand,div vjp rules
  • enhance GetReduceDims to support bidirectional broadcast , for example x=(1 2) y=(2 1), reduce_axes for x is 0, for y is 1
  • fix relative elementwise operators with bidirectional broadcast

@paddle-bot
Copy link

paddle-bot bot commented Jan 14, 2023

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

@cxxly cxxly force-pushed the prim_mul_expand_exp branch 14 times, most recently from 24ea6b7 to 7415a85 Compare January 15, 2023 02:19
Copy link
Contributor

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

one comments

// Reduced axes
for (std::size_t i = 0; i < src_shape.size(); i++) {
if (src_shape[i] == 1 && dst_shape[i] > 1) {
result.push_back(i);
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be miss some case if x, y has 1 as extra rank

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

@cxxly cxxly force-pushed the prim_mul_expand_exp branch 5 times, most recently from 2c79d11 to ca30b38 Compare January 16, 2023 08:33
Copy link
Contributor

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

LGTM

@JiabinYang JiabinYang merged commit 39c6765 into PaddlePaddle:develop Jan 17, 2023
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.

2 participants