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
2c63ba91
Commit
2c63ba91
authored
Apr 25, 2019
by
Michael Carilli
Browse files
Don't launch for empty sets
parent
91362442
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
apex/optimizers/fused_sgd.py
apex/optimizers/fused_sgd.py
+14
-13
No files found.
apex/optimizers/fused_sgd.py
View file @
2c63ba91
...
...
@@ -154,11 +154,12 @@ class FusedSGD(Optimizer):
[
fp32_grads
,
fp32_params
,
fp32_momentums
]]
for
launch_set
,
first_run
in
zip
(
launch_sets
,
first_runs
):
assert
len
(
launch_set
[
0
])
==
len
(
launch_set
[
1
])
assert
len
(
launch_set
[
0
])
==
len
(
launch_set
[
2
])
if
len
(
launch_set
[
0
])
>
0
:
multi_tensor_applier
(
self
.
multi_tensor_sgd
,
self
.
_dummy_overflow_buf
,
# Note: Need to do this as list comprehensions otherwise
# things don't seem to update properly.
launch_set
,
weight_decay
,
momentum
,
...
...
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