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
apex
Commits
cf918ac1
Commit
cf918ac1
authored
May 22, 2020
by
Kexin Yu
Browse files
more fixes on dtypes
parent
06a83ce7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
csrc/multi_tensor_lamb.cu
csrc/multi_tensor_lamb.cu
+1
-1
csrc/multi_tensor_lamb_stage_1.cu
csrc/multi_tensor_lamb_stage_1.cu
+1
-1
No files found.
csrc/multi_tensor_lamb.cu
View file @
cf918ac1
...
@@ -387,7 +387,7 @@ void multi_tensor_lamb_cuda(
...
@@ -387,7 +387,7 @@ void multi_tensor_lamb_cuda(
epsilon
,
epsilon
,
(
adamMode_t
)
mode
,
(
adamMode_t
)
mode
,
weight_decay
,
weight_decay
,
global_grad_norm
.
data
<
float
>
(),
global_grad_norm
.
DATA_PTR
<
float
>
(),
max_grad_norm
);
)
max_grad_norm
);
)
// Compute update norms
// Compute update norms
...
...
csrc/multi_tensor_lamb_stage_1.cu
View file @
cf918ac1
...
@@ -123,7 +123,7 @@ void multi_tensor_lamb_stage1_cuda(
...
@@ -123,7 +123,7 @@ void multi_tensor_lamb_stage1_cuda(
{
{
using
namespace
at
;
using
namespace
at
;
auto
g_grad_norm
=
global_grad_norm
.
data
<
float
>
();
const
float
*
g_grad_norm
=
global_grad_norm
.
DATA_PTR
<
float
>
();
float
clipped_global_grad_norm
=
*
(
g_grad_norm
)
>
max_global_grad_norm
?
*
(
g_grad_norm
)
/
max_global_grad_norm
:
1.0
f
;
float
clipped_global_grad_norm
=
*
(
g_grad_norm
)
>
max_global_grad_norm
?
*
(
g_grad_norm
)
/
max_global_grad_norm
:
1.0
f
;
float
next_step
=
float
(
step
+
1
);
float
next_step
=
float
(
step
+
1
);
float
beta1_correction
=
1.0
f
-
std
::
pow
(
beta1
,
next_step
);
float
beta1_correction
=
1.0
f
-
std
::
pow
(
beta1
,
next_step
);
...
...
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