Skip to content

[PTEN] Add Gpu context #39305

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

Merged
merged 17 commits into from
Feb 6, 2022
Merged

[PTEN] Add Gpu context #39305

merged 17 commits into from
Feb 6, 2022

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Jan 27, 2022

PR types

Others

PR changes

Others

Describe

Add Gpu context.

TODO:
1、现有的GPU Allocator需要stream参数,因此GPUContext的初始化需要拆分为【不需要allocator资源的初始化】和【需要allocator资源(eigen_device,cudnn_workspace)的初始化】;(该行为与设计不一致,需在GPU Allocator修改后同步修改)
2、SetDeviceAllocator接口名更改为SetAllocator
3、Pten下DeviceContext默认构造为空构造,(设置Allocator资源后)调用Init()函数初始化资源,预测调用SetXxx函数使用;
4、StreamCallback功能去除thread_pool头文件,使用std::async替代。

@paddle-bot-old
Copy link

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

@jiweibo jiweibo merged commit a821c4a into PaddlePaddle:develop Feb 6, 2022
@jiweibo jiweibo deleted the gpu_context branch February 6, 2022 03:05
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