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

[XPU] merge memery pool for Paddle and XHPC by using alloc overloading #63924

Merged
merged 11 commits into from
May 24, 2024

Conversation

lj970926
Copy link
Contributor

@lj970926 lj970926 commented Apr 27, 2024

PR Category

Performance Optimization

PR Types

New features

Description

  1. add xhpc buffer manager to manage memory allocation uniformly between Paddle and xhpc

Copy link

paddle-bot bot commented Apr 27, 2024

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

Copy link

paddle-ci-bot bot commented May 6, 2024

Sorry to inform you that 2440efb's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@XiaociZhang XiaociZhang left a comment

Choose a reason for hiding this comment

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

LGTM

};
context_->set_overload_alloc(
overload_alloc_fn, overload_free_fn, overload_save_fn);
gm_default_size = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是不是还会有那个BufferMgr align to 64的warning

Copy link
Contributor Author

@lj970926 lj970926 May 24, 2024

Choose a reason for hiding this comment

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

cd97c0d7d2265a92a63ba3fea7773436 对于GM,API会自动做64 Bytes对齐(L3不会)。这里设为1是因为之前API有bug,设为0的话buffer不会释放。(目前已修复,但Paddle还没合入,后续会统一换成0)

@houj04 houj04 merged commit ac015e5 into PaddlePaddle:develop May 24, 2024
32 checks passed
chen2016013 pushed a commit to chen2016013/Paddle that referenced this pull request May 26, 2024
PaddlePaddle#63924)

* fuse xhpc and paddle buffer

* refine code

* bug fix

* bug fix

* bug fix

* bug fix

* bug fix

* rename test

* bug fix

* refine code

* bug fix
@houj04 houj04 added the XPU label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants