Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
deepspeed
Commits
4c37d705
Unverified
Commit
4c37d705
authored
Oct 30, 2020
by
Reza Yazdani
Committed by
GitHub
Oct 30, 2020
Browse files
fixing the AVX_256 compatibility (#497)
parent
f5aa2547
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
csrc/adam/cpu_adam.cpp
csrc/adam/cpu_adam.cpp
+1
-2
No files found.
csrc/adam/cpu_adam.cpp
View file @
4c37d705
...
@@ -384,8 +384,7 @@ void Adam_Optimizer::Step_8(float* _params,
...
@@ -384,8 +384,7 @@ void Adam_Optimizer::Step_8(float* _params,
float
w_decay
=
-
1
*
_alpha
*
_weight_decay
;
float
w_decay
=
-
1
*
_alpha
*
_weight_decay
;
AVX_Data
weight_decay4
;
AVX_Data
weight_decay4
;
if
(
_weight_decay
>
0
)
if
(
_weight_decay
>
0
)
weight_decay4
.
data
=
weight_decay4
.
data
=
(
_adamw_mode
?
SIMD_SET
(
w_decay
)
:
SIMD_SET
(
_weight_decay
));
(
_adamw_mode
?
_mm512_set1_ps
(
w_decay
)
:
_mm512_set1_ps
(
_weight_decay
));
rounded_size
=
ROUND_DOWN
(
_param_size
,
(
SIMD_WIDTH
<<
3
));
rounded_size
=
ROUND_DOWN
(
_param_size
,
(
SIMD_WIDTH
<<
3
));
for
(
size_t
t
=
0
;
t
<
rounded_size
;
t
+=
TILE
)
{
for
(
size_t
t
=
0
;
t
<
rounded_size
;
t
+=
TILE
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment