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
8c18eb09
Commit
8c18eb09
authored
Mar 10, 2022
by
HELSON
Committed by
Frank Lee
Mar 11, 2022
Browse files
[profiler] Fixed bugs in CommProfiler and PcieProfiler (#377)
parent
b5f43ace
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
colossalai/utils/profiler/comm_profiler.py
colossalai/utils/profiler/comm_profiler.py
+1
-1
colossalai/utils/profiler/pcie_profiler.py
colossalai/utils/profiler/pcie_profiler.py
+4
-2
No files found.
colossalai/utils/profiler/comm_profiler.py
View file @
8c18eb09
...
...
@@ -140,7 +140,7 @@ class CommProfiler(BaseProfiler):
kernel_name
,
code_location
,
vol
=
self
.
pending_metadata
self
.
profiler
.
__exit__
(
None
,
None
,
None
)
if
self
.
profiler
.
enabled
:
if
self
.
profiler
.
enabled
and
dist
.
get_world_size
(
group
)
>
1
:
assert_flag
=
0
current_comm_event
=
None
events
=
self
.
profiler
.
function_events
...
...
colossalai/utils/profiler/pcie_profiler.py
View file @
8c18eb09
...
...
@@ -80,8 +80,10 @@ class PcieProfiler(BaseProfiler):
events
=
self
.
profiler
.
function_events
for
event
in
events
:
if
event
.
name
==
"aten::_to_copy"
:
current_comm_event
=
PcieEvent
(
1
,
self
.
data_size
*
_get_numel
(
event
.
input_shapes
[
0
]),
event
.
cuda_time_total
)
t_shape
=
event
.
input_shapes
[
0
]
if
len
(
t_shape
)
==
0
or
event
.
cuda_time_total
==
0
:
continue
current_comm_event
=
PcieEvent
(
1
,
self
.
data_size
*
_get_numel
(
t_shape
),
event
.
cuda_time_total
)
self
.
total_count
+=
current_comm_event
.
count
self
.
total_pcie_vol
+=
current_comm_event
.
pcie_vol
self
.
total_cuda_time
+=
current_comm_event
.
cuda_time
...
...
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