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

fix gcc12 error of coverage_ci #54009

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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