diff --git a/paddle/phi/kernels/cpu/adam_kernel.cc b/paddle/phi/kernels/cpu/adam_kernel.cc index 1e8cb8c16d863c..248844947f8059 100644 --- a/paddle/phi/kernels/cpu/adam_kernel.cc +++ b/paddle/phi/kernels/cpu/adam_kernel.cc @@ -140,8 +140,7 @@ PADDLE_API void AdamDenseKernel( const T* grad_ptr = grad.data(); auto adam = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache().At( - attr); + phi::jit::KernelFuncs, CPUPlace>::Cache().At(attr); static constexpr int64_t chunk_size = 512; diff --git a/paddle/phi/kernels/cpu/adamw_kernel.cc b/paddle/phi/kernels/cpu/adamw_kernel.cc index c5a644c56da949..67810413a85c5c 100644 --- a/paddle/phi/kernels/cpu/adamw_kernel.cc +++ b/paddle/phi/kernels/cpu/adamw_kernel.cc @@ -153,7 +153,7 @@ PADDLE_API void AdamwDenseKernel( const T* grad_ptr = grad.data(); auto adamw = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache().At( + phi::jit::KernelFuncs, CPUPlace>::Cache().At( attr); static constexpr int64_t chunk_size = 512; diff --git a/paddle/phi/kernels/cpu/crf_decoding_kernel.cc b/paddle/phi/kernels/cpu/crf_decoding_kernel.cc index 6b8f4d72645a45..b8487c3d4ba5a8 100644 --- a/paddle/phi/kernels/cpu/crf_decoding_kernel.cc +++ b/paddle/phi/kernels/cpu/crf_decoding_kernel.cc @@ -41,9 +41,9 @@ void Decode(const Context& dev_ctx, DenseTensor track; track.Resize(emission_dims); int* track_value = dev_ctx.template Alloc(&track); - auto ker = phi::jit::KernelFuncs, - phi::CPUPlace>::Cache() - .At(tag_num); + auto ker = + phi::jit::KernelFuncs, CPUPlace>::Cache() + .At(tag_num); ker(static_cast(seq_len), x, w, alpha_value, track_value, tag_num); T max_score = -std::numeric_limits::max(); int max_i = 0; diff --git a/paddle/phi/kernels/cpu/eig.h b/paddle/phi/kernels/cpu/eig.h index c842a25bd8b453..ff49a605a42d28 100644 --- a/paddle/phi/kernels/cpu/eig.h +++ b/paddle/phi/kernels/cpu/eig.h @@ -249,7 +249,7 @@ void MagmaEig(const Context& dev_ctx, // magma will modify original input, so copy to cpu at any case DenseTensor input_copy_cpu; input_copy_cpu.Resize(input.dims()); - Copy(dev_ctx, input, phi::CPUPlace(), false, &input_copy_cpu); + Copy(dev_ctx, input, CPUPlace(), false, &input_copy_cpu); using RealT = typename phi::dtype::Real; magma_vec_t jobvr = MagmaVec; @@ -274,7 +274,7 @@ void MagmaEig(const Context& dev_ctx, phi::dtype::Real* rwork_data = nullptr; rwork.Resize(common::make_ddim({lda * 2})); - auto cpu_place = phi::CPUPlace(); + auto cpu_place = CPUPlace(); phi::DeviceContextPool& pool = phi::DeviceContextPool::Instance(); auto* cpu_ctx = static_cast(pool.Get(cpu_place)); rwork_data = (*cpu_ctx).template Alloc>(&rwork); @@ -345,7 +345,7 @@ void ApplyEigKernelMagma(const Context& dev_ctx, DenseTensor vectors_row_major_cpu; vectors_row_major_cpu.Resize(input.dims()); - auto cpu_place = phi::CPUPlace(); + auto cpu_place = CPUPlace(); phi::DeviceContextPool& pool = phi::DeviceContextPool::Instance(); auto* cpu_ctx = static_cast(pool.Get(cpu_place)); (*cpu_ctx).template Alloc(&vectors_row_major_cpu); diff --git a/paddle/phi/kernels/cpu/fusion_seqpool_concat_kernel.cc b/paddle/phi/kernels/cpu/fusion_seqpool_concat_kernel.cc index 7a6da56f8510fa..6332134ae854c2 100644 --- a/paddle/phi/kernels/cpu/fusion_seqpool_concat_kernel.cc +++ b/paddle/phi/kernels/cpu/fusion_seqpool_concat_kernel.cc @@ -55,8 +55,8 @@ void FusionSeqPoolConcatKernel(const Context& dev_ctx, attr.type = phi::jit::SeqPoolType::kSqrt; } auto seqpool = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache() - .At(attr); + phi::jit::KernelFuncs, CPUPlace>::Cache().At( + attr); size_t n = ins.size(); size_t dst_step_size = n * w; for (size_t i = 0; i < n; ++i) { diff --git a/paddle/phi/kernels/cpu/index_select_impl.h b/paddle/phi/kernels/cpu/index_select_impl.h index c1fb20739e8630..1aa4e2d095e661 100644 --- a/paddle/phi/kernels/cpu/index_select_impl.h +++ b/paddle/phi/kernels/cpu/index_select_impl.h @@ -65,7 +65,7 @@ void IndexSelectInner(const Context& dev_ctx, DenseTensor index_cpu_copy; if (index.place().GetType() != AllocationType::CPU) { - Copy(dev_ctx, index, phi::CPUPlace(), true, &index_cpu_copy); + Copy(dev_ctx, index, CPUPlace(), true, &index_cpu_copy); } const IndexT* index_data = index.place().GetType() == AllocationType::CPU ? index.data() diff --git a/paddle/phi/kernels/cpu/layer_norm_kernel.cc b/paddle/phi/kernels/cpu/layer_norm_kernel.cc index 8a397be55f88b9..b1b1c4572ea7bf 100644 --- a/paddle/phi/kernels/cpu/layer_norm_kernel.cc +++ b/paddle/phi/kernels/cpu/layer_norm_kernel.cc @@ -133,8 +133,8 @@ void LayerNormKernel(const Context& dev_ctx, } auto ker = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache() - .At(right); + phi::jit::KernelFuncs, CPUPlace>::Cache().At( + right); ker(x_tmp.data(), out.data(), mean_tmp.data(), diff --git a/paddle/phi/kernels/cpu/sgd_kernel.cc b/paddle/phi/kernels/cpu/sgd_kernel.cc index bb1eac9ab518e8..48a29a12f487ac 100644 --- a/paddle/phi/kernels/cpu/sgd_kernel.cc +++ b/paddle/phi/kernels/cpu/sgd_kernel.cc @@ -35,8 +35,7 @@ void sgd_dense_param_dense_grad_impl(const DenseTensor& param, T* out_data = param_out->data(); auto sgd = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache().At( - attr); + phi::jit::KernelFuncs, CPUPlace>::Cache().At(attr); sgd(lr, param_data, grad_data, &rows_idx, out_data, &attr); } @@ -76,8 +75,7 @@ void sgd_dense_param_sparse_grad_impl(const DenseTensor& param, attr.selected_rows_size = static_cast(grad_rows.size()); auto sgd = - phi::jit::KernelFuncs, phi::CPUPlace>::Cache().At( - attr); + phi::jit::KernelFuncs, CPUPlace>::Cache().At(attr); sgd(lr, param_data, grad_data, rows_data, out_data, &attr); }