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
534e0bb1
Commit
534e0bb1
authored
Mar 09, 2022
by
HELSON
Committed by
Frank Lee
Mar 11, 2022
Browse files
Fixed import bug for no-tensorboard environment (#354)
parent
c57e0898
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
colossalai/utils/profiler/comm_profiler.py
colossalai/utils/profiler/comm_profiler.py
+1
-2
No files found.
colossalai/utils/profiler/comm_profiler.py
View file @
534e0bb1
...
...
@@ -5,7 +5,6 @@ import torch
from
torch.autograd.profiler
import
profile
import
torch.distributed
as
dist
from
torch.distributed
import
ReduceOp
import
torch.utils.tensorboard
as
tb
from
colossalai.utils
import
get_current_device
from
.prof_utils
import
BaseProfiler
from
typing
import
List
,
Optional
...
...
@@ -126,7 +125,7 @@ class CommProfiler(BaseProfiler):
dist
.
broadcast
=
torch_broadcast
dist
.
reduce
=
torch_reduce
def
to_tensorboard
(
self
,
writer
:
tb
.
writer
):
def
to_tensorboard
(
self
,
writer
):
writer
.
add_text
(
tag
=
"Collective Communication"
,
text_string
=
self
.
result_list
(
"
\n\n
"
))
def
to_file
(
self
,
filename
:
Path
):
...
...
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