Skip to content

Commit

Permalink
fix gcc12 error of coverage_ci (PaddlePaddle#54009)
Browse files Browse the repository at this point in the history
  • Loading branch information
risemeup1 authored and bukejiyu committed May 22, 2023
1 parent 6a9a7c6 commit 223b170
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions paddle/phi/core/device_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ struct DeviceContext::Impl {
DeviceContext::DeviceContext() { impl_ = std::make_unique<Impl>(); }

DeviceContext::DeviceContext(const DeviceContext& other) {
impl_ = std::make_unique<Impl>();
impl_->SetHostAllocator(&other.GetHostAllocator());
impl_->SetAllocator(&other.GetAllocator());
impl_->SetZeroAllocator(&other.GetZeroAllocator());
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/core/utils/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Array {
return ptr + i;
}

T data_[N];
T data_[N] = {};
};

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/detail/gru_cpu_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void hl_avx_gru_forward_reset_output(OpResetOutput op_reset_output,
#ifdef __AVX__
__m256 r_value_update_gate, r_value_update_gate_last = _mm256_set1_ps(0.0f);
__m256 r_value_reset_gate, r_value_reset_gate_last = _mm256_set1_ps(0.0f);
__m256 r_value_reset_output;
__m256 r_value_reset_output = _mm256_setzero_ps();
__m256 r_prev_out = _mm256_set1_ps(0.0f),
r_prev_out_last = _mm256_set1_ps(0.0f);
__m256 r_reset_bias = _mm256_set1_ps(0.0f);
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/jit/more/intrinsic/layer_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void LayerNorm(float* x,
__m256 sum;
__m256 mean_vec, var_vec;
__m128 hi, lo;
__m256 tmp;
__m256 tmp = _mm256_setzero_ps();
size_t offset;
size_t j;
__m256 reverse_num_vec =
Expand Down

0 comments on commit 223b170

Please sign in to comment.