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
c978bda5
Commit
c978bda5
authored
Apr 26, 2019
by
Michael Carilli
Browse files
whitespace
parent
73d4212d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
apex/parallel/distributed.py
apex/parallel/distributed.py
+2
-2
csrc/fused_adam_cuda_kernel.cu
csrc/fused_adam_cuda_kernel.cu
+4
-4
No files found.
apex/parallel/distributed.py
View file @
c978bda5
...
...
@@ -584,8 +584,8 @@ class DistributedDataParallel(Module):
# self.buckets = [[None for _ in range(self.bucket_sizes[i])]
# for i in range(self.num_buckets)]
if
not
self
.
buckets
:
self
.
buckets
=
[[
None
for
_
in
range
(
self
.
bucket_sizes
[
i
])]
for
i
in
range
(
self
.
num_buckets
)]
self
.
buckets
=
[[
None
for
_
in
range
(
self
.
bucket_sizes
[
i
])]
for
i
in
range
(
self
.
num_buckets
)]
else
:
assert
len
(
self
.
buckets
)
==
self
.
num_buckets
,
"len(buckets) = {}, expected {}"
.
format
(
len
(
self
.
buckets
),
self
.
num_buckets
)
...
...
csrc/fused_adam_cuda_kernel.cu
View file @
c978bda5
...
...
@@ -98,18 +98,18 @@ struct AdamFunctor
T
incoming_m
[
ILP
];
T
incoming_v
[
ILP
];
T
incoming_g
[
ILP
];
for
(
int
i_start
=
0
;
i_start
<
n
&&
i_start
<
chunk_size
;
i_start
+=
blockDim
.
x
*
ILP
)
{
#pragma unroll
for
(
int
ii
=
0
;
ii
<
ILP
;
ii
++
)
{
incoming_p
[
ii
]
=
0
;
incoming_m
[
ii
]
=
0
;
incoming_v
[
ii
]
=
0
;
incoming_g
[
ii
]
=
0
;
int
i
=
i_start
+
threadIdx
.
x
+
ii
*
blockDim
.
x
;
if
(
i
<
n
&&
i
<
chunk_size
)
{
incoming_p
[
ii
]
=
p
[
i
];
...
...
@@ -296,7 +296,7 @@ void fused_adam_cuda_mt(
}));
}
}
else
{
if
(
tl_sz
==
5
)
{
if
(
tl_sz
==
5
)
{
AT_DISPATCH_FLOATING_TYPES
(
tensor_lists
[
3
][
0
].
type
(),
"adam_cuda_mt_kernel"
,
([
&
]
{
multi_tensor_apply
<
5
>
(
BLOCK_SIZE
,
...
...
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