Skip to content

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

// 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

2 participants