未验证 提交 a0085a77 编写于 作者: R risemeup1 提交者: GitHub

fix gcc12 error of coverage_ci (#54009)

上级 9fb22293
...@@ -297,6 +297,7 @@ struct DeviceContext::Impl { ...@@ -297,6 +297,7 @@ struct DeviceContext::Impl {
DeviceContext::DeviceContext() { impl_ = std::make_unique<Impl>(); } DeviceContext::DeviceContext() { impl_ = std::make_unique<Impl>(); }
DeviceContext::DeviceContext(const DeviceContext& other) { DeviceContext::DeviceContext(const DeviceContext& other) {
impl_ = std::make_unique<Impl>();
impl_->SetHostAllocator(&other.GetHostAllocator()); impl_->SetHostAllocator(&other.GetHostAllocator());
impl_->SetAllocator(&other.GetAllocator()); impl_->SetAllocator(&other.GetAllocator());
impl_->SetZeroAllocator(&other.GetZeroAllocator()); impl_->SetZeroAllocator(&other.GetZeroAllocator());
......
...@@ -85,7 +85,7 @@ class Array { ...@@ -85,7 +85,7 @@ class Array {
return ptr + i; return ptr + i;
} }
T data_[N]; T data_[N] = {};
}; };
template <typename T> template <typename T>
......
...@@ -130,7 +130,7 @@ void hl_avx_gru_forward_reset_output(OpResetOutput op_reset_output, ...@@ -130,7 +130,7 @@ void hl_avx_gru_forward_reset_output(OpResetOutput op_reset_output,
#ifdef __AVX__ #ifdef __AVX__
__m256 r_value_update_gate, r_value_update_gate_last = _mm256_set1_ps(0.0f); __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_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), __m256 r_prev_out = _mm256_set1_ps(0.0f),
r_prev_out_last = _mm256_set1_ps(0.0f); r_prev_out_last = _mm256_set1_ps(0.0f);
__m256 r_reset_bias = _mm256_set1_ps(0.0f); __m256 r_reset_bias = _mm256_set1_ps(0.0f);
......
...@@ -43,7 +43,7 @@ void LayerNorm(float* x, ...@@ -43,7 +43,7 @@ void LayerNorm(float* x,
__m256 sum; __m256 sum;
__m256 mean_vec, var_vec; __m256 mean_vec, var_vec;
__m128 hi, lo; __m128 hi, lo;
__m256 tmp; __m256 tmp = _mm256_setzero_ps();
size_t offset; size_t offset;
size_t j; size_t j;
__m256 reverse_num_vec = __m256 reverse_num_vec =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册