未验证 提交 65f38869 编写于 作者: L Leo Chen 提交者: GitHub

fix namespace of GPUContext (#44822)

上级 669353c1
...@@ -69,7 +69,7 @@ struct TestReduceOpHandle { ...@@ -69,7 +69,7 @@ struct TestReduceOpHandle {
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
auto p = p::CUDAPlace(i); auto p = p::CUDAPlace(i);
gpu_list_.push_back(p); gpu_list_.push_back(p);
ctxs_.emplace_back(new p::phi::GPUContext(p)); ctxs_.emplace_back(new phi::GPUContext(p));
} }
nccl_ctxs_.reset(new platform::NCCLContextMap(gpu_list_)); nccl_ctxs_.reset(new platform::NCCLContextMap(gpu_list_));
#else #else
......
...@@ -98,7 +98,7 @@ TEST(Dropout, CPUDense) { ...@@ -98,7 +98,7 @@ TEST(Dropout, CPUDense) {
TEST(Dropout, GPUDense) { TEST(Dropout, GPUDense) {
f::Scope scope; f::Scope scope;
p::CUDAPlace place; p::CUDAPlace place;
p::phi::GPUContext ctx(place); phi::GPUContext ctx(place);
Compare(scope, ctx); Compare(scope, ctx);
} }
*/ */
...@@ -881,10 +881,10 @@ class SparseAttentionGradCUDAKernel : public framework::OpKernel<T> { ...@@ -881,10 +881,10 @@ class SparseAttentionGradCUDAKernel : public framework::OpKernel<T> {
} // namespace paddle } // namespace paddle
REGISTER_OP_CUDA_KERNEL( REGISTER_OP_CUDA_KERNEL(
sparse_attention, sparse_attention,
ops::SparseAttentionCUDAKernel<plf::phi::GPUContext, float>, ops::SparseAttentionCUDAKernel<phi::GPUContext, float>,
ops::SparseAttentionCUDAKernel<plf::phi::GPUContext, double>); ops::SparseAttentionCUDAKernel<phi::GPUContext, double>);
REGISTER_OP_CUDA_KERNEL( REGISTER_OP_CUDA_KERNEL(
sparse_attention_grad, sparse_attention_grad,
ops::SparseAttentionGradCUDAKernel<plf::phi::GPUContext, float>, ops::SparseAttentionGradCUDAKernel<phi::GPUContext, float>,
ops::SparseAttentionGradCUDAKernel<plf::phi::GPUContext, double>); ops::SparseAttentionGradCUDAKernel<phi::GPUContext, double>);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册