Skip to content
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

[clang-tidy] NO.6 enable modernize-avoid-c-arrays check #55774

Prev Previous commit
Next Next commit
fix accuracy_kernel
  • Loading branch information
gouzil committed Jul 30, 2023
commit 32546e9140b4cc4a79aaa6e01a1d649db698abc2
3 changes: 1 addition & 2 deletions paddle/phi/kernels/gpu/accuracy_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include <thrust/execution_policy.h>
#include <thrust/reduce.h>
#include <array>

#include "paddle/phi/backends/gpu/gpu_context.h"
#include "paddle/phi/backends/gpu/gpu_info.h"
Expand All @@ -39,7 +38,7 @@ __global__ void AccuracyCudaKernel(const int N,
int* total_data) {
using MT = typename phi::dtype::MPTypeTrait<T>::Type;
int count = 0;
__shared__ std::array<int, BlockSize> total;
__shared__ int total[BlockSize]; // NOLINT

// support only 1 block
for (int i = threadIdx.x; i < (N); i += BlockSize) {
Expand Down