Skip to content

Commit

Permalink
fixing the AVX_256 compatibility (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaYazdaniAminabadi committed Oct 30, 2020
1 parent f5aa254 commit 4c37d70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions csrc/adam/cpu_adam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ void Adam_Optimizer::Step_8(float* _params,
float w_decay = -1 * _alpha * _weight_decay;
AVX_Data weight_decay4;
if (_weight_decay > 0)
weight_decay4.data =
(_adamw_mode ? _mm512_set1_ps(w_decay) : _mm512_set1_ps(_weight_decay));
weight_decay4.data = (_adamw_mode ? SIMD_SET(w_decay) : SIMD_SET(_weight_decay));
rounded_size = ROUND_DOWN(_param_size, (SIMD_WIDTH << 3));

for (size_t t = 0; t < rounded_size; t += TILE) {
Expand Down

0 comments on commit 4c37d70

Please sign in to comment.