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

Unify the implementation of AlignedVector and simplify the codes of dropout and cast. #35373

Merged
merged 3 commits into from
Sep 3, 2021

Conversation

Xreki
Copy link
Contributor

@Xreki Xreki commented Sep 1, 2021

PR types

Function optimization

PR changes

OPs

Describe

  • 当前在dropout、cast、elementwise_xxx等算子中各存在一个AlignedVector类型的定义,主要用于CUDA中向量化的数据读写操作。这个PR将AlignedVector类型及其相关的操作移动到一个独立的文件aligned_vector.h中,移除op中冗余的AlignedVector
  • AlignedVector实现了一个Load、Store操作,避免在代码中指针的反复显式调用reinterpret_cast

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 1, 2021

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

@Xreki Xreki changed the title Unify the implementation of AlignedVector. Unify the implementation of AlignedVector and simplify the codes of dropout and cast. Sep 1, 2021
Copy link
Contributor

@zhangting2020 zhangting2020 left a comment

Choose a reason for hiding this comment

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

LGTM

@Xreki Xreki merged commit c171eca into PaddlePaddle:develop Sep 3, 2021
@Xreki Xreki deleted the opt/aligned_vector branch September 3, 2021 06:46
limin2021 added a commit to limin2021/Paddle that referenced this pull request Sep 13, 2021
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