Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
0974c9bc
Unverified
Commit
0974c9bc
authored
Jan 20, 2025
by
Yuan Tang
Committed by
GitHub
Jan 20, 2025
Browse files
[Bugfix] Fix incorrect types in LayerwiseProfileResults (#12196)
Signed-off-by:
Yuan Tang
<
terrytangyuan@gmail.com
>
parent
d2643128
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/profiler/layerwise_profile.py
vllm/profiler/layerwise_profile.py
+3
-3
No files found.
vllm/profiler/layerwise_profile.py
View file @
0974c9bc
import
copy
from
collections
import
defaultdict
from
dataclasses
import
asdict
,
dataclass
,
field
from
typing
import
Callable
,
Dict
,
List
,
Optional
,
Tuple
,
TypeAlias
,
Union
from
typing
import
Any
,
Callable
,
Dict
,
List
,
Optional
,
Tuple
,
TypeAlias
,
Union
import
pandas
as
pd
from
torch._C._autograd
import
DeviceType
,
_KinetoEvent
,
_ProfilerResult
...
...
@@ -128,7 +128,7 @@ class LayerwiseProfileResults(profile):
])
df
.
to_csv
(
filename
)
def
convert_stats_to_dict
(
self
)
->
str
:
def
convert_stats_to_dict
(
self
)
->
dict
[
str
,
Any
]
:
return
{
"metadata"
:
{
"num_running_seqs"
:
self
.
num_running_seqs
...
...
@@ -227,7 +227,7 @@ class LayerwiseProfileResults(profile):
[
self
.
_cumulative_cuda_time
(
root
)
for
root
in
self
.
_module_tree
])
def
_build_stats_trees
(
self
):
summary_dict
:
Dict
[
str
,
self
.
StatsTreeNode
]
=
{}
summary_dict
:
Dict
[
str
,
_
StatsTreeNode
]
=
{}
total_cuda_time
=
self
.
_total_cuda_time
()
def
pct_cuda_time
(
cuda_time_us
):
...
...
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