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
90795025
Commit
90795025
authored
Mar 19, 2020
by
Thor Johnsen
Browse files
Bug fixes
parent
174abea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
apex/contrib/csrc/optimizers/fused_adam_cuda_kernel.cu
apex/contrib/csrc/optimizers/fused_adam_cuda_kernel.cu
+7
-7
No files found.
apex/contrib/csrc/optimizers/fused_adam_cuda_kernel.cu
View file @
90795025
...
...
@@ -517,7 +517,7 @@ void fused_adam_cuda_no_overflow_check(
//Determine #threads and #blocks
const
int
threadsPerBlock
=
512
;
const
dim3
blocks
((
tsize
+
threadsPerBlock
-
1
)
/
threadsPerBlock
);
AT_ASSERTM
(
at
::
cuda
::
detail
::
canUse32BitIndexMath
(
p
),
"parameter tensor is too large to be indexed with int32"
);
AT_ASSERTM
(
at
::
cuda
::
detail
::
canUse32BitIndexMath
(
p
_in
),
"parameter tensor is too large to be indexed with int32"
);
//Constants
float
step_size
=
0
;
if
(
bias_correction
==
1
)
{
...
...
@@ -559,13 +559,13 @@ void fused_adam_cuda_no_overflow_check(
using
namespace
at
;
DISPATCH_DOUBLE_AND_FLOAT
(
g
.
scalar_type
(),
0
,
"adam_cuda_kernel"
,
adam_cuda_no_overflow_check_kernel
<
scalar_t_0
,
scalar_t_0
><<<
blocks
,
threadsPerBlock
,
0
,
stream
>>>
(
p_in
.
DATA_PTR
<
acc
scalar_t
>
(),
p_out
.
DATA_PTR
<
acc
scalar_t
>
(),
p_in
.
DATA_PTR
<
scalar_t
_0
>
(),
p_out
.
DATA_PTR
<
scalar_t
_0
>
(),
NULL
,
//don't output p_copy for fp32, it's wasted write
m_in
.
DATA_PTR
<
acc
scalar_t
>
(),
m_out
.
DATA_PTR
<
acc
scalar_t
>
(),
v_in
.
DATA_PTR
<
acc
scalar_t
>
(),
v_out
.
DATA_PTR
<
acc
scalar_t
>
(),
m_in
.
DATA_PTR
<
scalar_t
_0
>
(),
m_out
.
DATA_PTR
<
scalar_t
_0
>
(),
v_in
.
DATA_PTR
<
scalar_t
_0
>
(),
v_out
.
DATA_PTR
<
scalar_t
_0
>
(),
g
.
DATA_PTR
<
scalar_t_0
>
(),
beta1
,
beta2
,
...
...
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