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
fairscale
Commits
886aa327
Unverified
Commit
886aa327
authored
Mar 08, 2021
by
Benjamin Lefaudeux
Committed by
GitHub
Mar 08, 2021
Browse files
[chore] OSS perf test, super minor (#495)
parent
8c405c51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
benchmarks/golden_configs/oss_mnist.py
benchmarks/golden_configs/oss_mnist.py
+1
-1
benchmarks/oss.py
benchmarks/oss.py
+2
-1
No files found.
benchmarks/golden_configs/oss_mnist.py
View file @
886aa327
...
...
@@ -4,7 +4,7 @@
def
get_golden_real_stats
():
return
{
"reference_speed"
:
6
5
0
,
"reference_speed"
:
6
6
0
,
"reference_memory"
:
1000
,
"reference_loss"
:
0.026
,
}
...
...
benchmarks/oss.py
View file @
886aa327
...
...
@@ -150,7 +150,8 @@ def train(
if
optim_type
==
OptimType
.
oss_sharded_ddp
:
optimizer
=
OSS
(
params
=
model
.
parameters
(),
optim
=
OPTIM
,
lr
=
1e-4
,
momentum
=
0.9
)
model
=
ShardedDDP
(
model
,
optimizer
)
# Single node run typically, no need for reduce buckets
model
=
ShardedDDP
(
model
,
optimizer
,
reduce_buffer_size
=
0
)
else
:
device_ids
=
None
if
args
.
cpu
else
[
rank
]
model
=
DDP
(
model
,
device_ids
=
device_ids
,
find_unused_parameters
=
False
)
# type: ignore
...
...
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