From 65f388690048d0965ec7d3b43fb6ee9d8c6dee7c Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 2 Aug 2022 23:38:16 +0800 Subject: [PATCH] fix namespace of GPUContext (#44822) --- paddle/fluid/framework/details/reduce_op_handle_test.cc | 2 +- paddle/fluid/operators/dropout_op_test.cc | 2 +- paddle/fluid/operators/sparse_attention_op.cu | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/framework/details/reduce_op_handle_test.cc b/paddle/fluid/framework/details/reduce_op_handle_test.cc index ad7888c0654..7f38629f4e6 100644 --- a/paddle/fluid/framework/details/reduce_op_handle_test.cc +++ b/paddle/fluid/framework/details/reduce_op_handle_test.cc @@ -69,7 +69,7 @@ struct TestReduceOpHandle { for (int i = 0; i < count; ++i) { auto p = p::CUDAPlace(i); 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_)); #else diff --git a/paddle/fluid/operators/dropout_op_test.cc b/paddle/fluid/operators/dropout_op_test.cc index d51c57d6eab..f63e7858747 100644 --- a/paddle/fluid/operators/dropout_op_test.cc +++ b/paddle/fluid/operators/dropout_op_test.cc @@ -98,7 +98,7 @@ TEST(Dropout, CPUDense) { TEST(Dropout, GPUDense) { f::Scope scope; p::CUDAPlace place; - p::phi::GPUContext ctx(place); + phi::GPUContext ctx(place); Compare(scope, ctx); } */ diff --git a/paddle/fluid/operators/sparse_attention_op.cu b/paddle/fluid/operators/sparse_attention_op.cu index 8bf431e59f0..95c0562eb72 100644 --- a/paddle/fluid/operators/sparse_attention_op.cu +++ b/paddle/fluid/operators/sparse_attention_op.cu @@ -881,10 +881,10 @@ class SparseAttentionGradCUDAKernel : public framework::OpKernel { } // namespace paddle REGISTER_OP_CUDA_KERNEL( sparse_attention, - ops::SparseAttentionCUDAKernel, - ops::SparseAttentionCUDAKernel); + ops::SparseAttentionCUDAKernel, + ops::SparseAttentionCUDAKernel); REGISTER_OP_CUDA_KERNEL( sparse_attention_grad, - ops::SparseAttentionGradCUDAKernel, - ops::SparseAttentionGradCUDAKernel); + ops::SparseAttentionGradCUDAKernel, + ops::SparseAttentionGradCUDAKernel); -- GitLab