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
ColossalAI
Commits
ee287620
Unverified
Commit
ee287620
authored
Dec 16, 2022
by
Jiarui Fang
Committed by
GitHub
Dec 16, 2022
Browse files
[Gemini] revert ZeROInitCtx related tracer (#2138)
parent
077a66dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
colossalai/gemini/memory_tracer/memstats_collector.py
colossalai/gemini/memory_tracer/memstats_collector.py
+7
-2
No files found.
colossalai/gemini/memory_tracer/memstats_collector.py
View file @
ee287620
...
@@ -73,10 +73,15 @@ class MemStatsCollector:
...
@@ -73,10 +73,15 @@ class MemStatsCollector:
# deprecated
# deprecated
def
record_model_data_volume
(
self
)
->
None
:
def
record_model_data_volume
(
self
)
->
None
:
"""Sampling model data statistics.
"""
Sampling model data statistics.
"""
"""
if
self
.
_start_flag
and
not
self
.
use_outside_memstats
:
if
self
.
_start_flag
and
not
self
.
use_outside_memstats
:
raise
NotImplementedError
(
"MemStatsCollector has not implemented record_model_data_volume"
)
# The following code work for ZeroInitContext, which is deprecated in v0.1.12
cuda_mem
=
StatefulTensor
.
GST_MGR
.
total_mem
[
'cuda'
]
cpu_mem
=
StatefulTensor
.
GST_MGR
.
total_mem
[
'cpu'
]
self
.
_memstats
.
append_model_data
(
'cuda'
,
cuda_mem
)
self
.
_memstats
.
append_model_data
(
'cpu'
,
cpu_mem
)
def
sample_overall_data
(
self
)
->
None
:
def
sample_overall_data
(
self
)
->
None
:
"""
"""
...
...
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