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

Decrease usage of GetVecSize for optimizing host computation efficiency #50353

Merged

Conversation

JamesLim-sy
Copy link
Contributor

@JamesLim-sy JamesLim-sy commented Feb 8, 2023

PR types

Function optimization

PR changes

APIs

Describe

  • 特点 : 用指针的地址做『或』操作得到结果地址,再用结果地址去做phi::GetVectorizedSize()等价于std::min(phi::GetVectorizedSize<T>(x_ptr), phi::GetVectorizedSize<T>(y_ptr)),两者返回的'VecSize'结果相同,而前者减少了GetVectorizedSize 的调用规模.

  • PS:由于我的linux环境被不小心更改了github-id,导致我的前两个commit 提交id 错误,请忽略.

@paddle-bot
Copy link

paddle-bot bot commented Feb 8, 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.

@JamesLim-sy JamesLim-sy changed the title Change Param type of of linspace Decrease number of GetVecSize for optimizing host computation efficiency Feb 13, 2023
@JamesLim-sy JamesLim-sy changed the title Decrease number of GetVecSize for optimizing host computation efficiency Decrease usage of GetVecSize for optimizing host computation efficiency Feb 13, 2023
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

@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

@JamesLim-sy JamesLim-sy merged commit 976606f into PaddlePaddle:develop Feb 14, 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.

3 participants