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
deepspeed
Commits
b1d4bd73
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "20e92586c1fda968ea3343ba0f44f2b21f3c09d2"
Unverified
Commit
b1d4bd73
authored
Sep 10, 2020
by
Jeff Rasley
Committed by
GitHub
Sep 10, 2020
Browse files
fix for 16GB v100 nodes (#393)
parent
2dea61f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
deepspeed/runtime/zero/stage2.py
deepspeed/runtime/zero/stage2.py
+1
-0
tests/unit/test_fp16.py
tests/unit/test_fp16.py
+3
-1
No files found.
deepspeed/runtime/zero/stage2.py
View file @
b1d4bd73
...
@@ -1585,6 +1585,7 @@ class FP16_DeepSpeedZeroOptimizer(object):
...
@@ -1585,6 +1585,7 @@ class FP16_DeepSpeedZeroOptimizer(object):
if
self
.
cpu_offload
:
if
self
.
cpu_offload
:
torch
.
cuda
.
current_stream
().
wait_stream
(
self
.
migration_stream
)
torch
.
cuda
.
current_stream
().
wait_stream
(
self
.
migration_stream
)
#TODO: we need to revist this and remove the magic 4.5x multiplier here
if
self
.
contiguous_gradients
:
if
self
.
contiguous_gradients
:
self
.
ipg_buffer
=
[]
self
.
ipg_buffer
=
[]
buf_0
=
torch
.
empty
(
int
(
self
.
reduce_bucket_size
*
4.5
),
buf_0
=
torch
.
empty
(
int
(
self
.
reduce_bucket_size
*
4.5
),
...
...
tests/unit/test_fp16.py
View file @
b1d4bd73
...
@@ -445,7 +445,9 @@ def test_zero_empty_partition(tmpdir, zero_stage, use_cpu_offload):
...
@@ -445,7 +445,9 @@ def test_zero_empty_partition(tmpdir, zero_stage, use_cpu_offload):
},
},
"zero_optimization"
:
{
"zero_optimization"
:
{
"stage"
:
zero_stage
,
"stage"
:
zero_stage
,
"cpu_offload"
:
use_cpu_offload
"cpu_offload"
:
use_cpu_offload
,
"reduce_bucket_size"
:
100
,
"allgather_bucket_size"
:
100
}
}
}
}
args
=
args_from_dict
(
tmpdir
,
config_dict
)
args
=
args_from_dict
(
tmpdir
,
config_dict
)
...
...
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