"vscode:/vscode.git/clone" did not exist on "6ad8796cfcbf6da6f7aa33b7863721510582952e"
Commit 2c63ba91 authored by Michael Carilli's avatar Michael Carilli
Browse files

Don't launch for empty sets

parent 91362442
...@@ -154,11 +154,12 @@ class FusedSGD(Optimizer): ...@@ -154,11 +154,12 @@ class FusedSGD(Optimizer):
[fp32_grads, fp32_params, fp32_momentums]] [fp32_grads, fp32_params, fp32_momentums]]
for launch_set, first_run in zip(launch_sets, first_runs): 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( multi_tensor_applier(
self.multi_tensor_sgd, self.multi_tensor_sgd,
self._dummy_overflow_buf, self._dummy_overflow_buf,
# Note: Need to do this as list comprehensions otherwise
# things don't seem to update properly.
launch_set, launch_set,
weight_decay, weight_decay,
momentum, momentum,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment