Skip to content

[PTen] Unify device context entrance in pten part 2 #38182

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 6 commits into from
Dec 16, 2021

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Dec 16, 2021

PR types

Function optimization

PR changes

Others

Describe

[PTen] Unify device context entrance in pten part 2

part 1:#38172

@@ -17,16 +17,13 @@
// CUDA and HIP use same api
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)

#include "paddle/pten/backends/cuda/cuda_context.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

目前看起来CUDAContext和ROCMContext实际90%成员变量函数都一样,只有少数cusolver等没对齐。
backends/cuda/cuda_context.h后续可以替换成backends/gpu/gpu_context.h似乎更合理,后续达成共识后可以在统一修改

Copy link
Contributor Author

@chenwhql chenwhql Dec 16, 2021

Choose a reason for hiding this comment

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

可以,我觉得kernels目录也从cuda换成gpu比较合理

Copy link
Contributor

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit e02537f into PaddlePaddle:develop Dec 16, 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