Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
bc69a534
Commit
bc69a534
authored
Nov 26, 2019
by
Haichen Shen
Committed by
Yizhi Liu
Nov 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak debugger result (#4426)
parent
accc7db8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
python/tvm/contrib/debugger/debug_result.py
+10
-6
No files found.
python/tvm/contrib/debugger/debug_result.py
View file @
bc69a534
...
@@ -204,9 +204,8 @@ class DebugResult(object):
...
@@ -204,9 +204,8 @@ class DebugResult(object):
with
open
(
os
.
path
.
join
(
self
.
_dump_path
,
graph_dump_file_name
),
'w'
)
as
outfile
:
with
open
(
os
.
path
.
join
(
self
.
_dump_path
,
graph_dump_file_name
),
'w'
)
as
outfile
:
json
.
dump
(
graph
,
outfile
,
indent
=
4
,
sort_keys
=
False
)
json
.
dump
(
graph
,
outfile
,
indent
=
4
,
sort_keys
=
False
)
def
display_debug_result
(
self
,
sort_by_time
=
True
):
def
get_debug_result
(
self
,
sort_by_time
=
True
):
"""Displays the debugger result"
"""Return the debugger result"""
"""
header
=
[
"Node Name"
,
"Ops"
,
"Time(us)"
,
"Time(
%
)"
,
"Shape"
,
"Inputs"
,
"Outputs"
]
header
=
[
"Node Name"
,
"Ops"
,
"Time(us)"
,
"Time(
%
)"
,
"Shape"
,
"Inputs"
,
"Outputs"
]
lines
=
[
"---------"
,
"---"
,
"--------"
,
"-------"
,
"-----"
,
"------"
,
"-------"
]
lines
=
[
"---------"
,
"---"
,
"--------"
,
"-------"
,
"-----"
,
"------"
,
"-------"
]
eid
=
0
eid
=
0
...
@@ -244,10 +243,15 @@ class DebugResult(object):
...
@@ -244,10 +243,15 @@ class DebugResult(object):
if
item_len
>
max_len
:
if
item_len
>
max_len
:
max_len
=
item_len
max_len
=
item_len
fmt
=
fmt
+
"{:<"
+
str
(
max_len
+
2
)
+
"}"
fmt
=
fmt
+
"{:<"
+
str
(
max_len
+
2
)
+
"}"
print
(
fmt
.
format
(
*
header
))
log
=
[
fmt
.
format
(
*
header
)]
print
(
fmt
.
format
(
*
lines
))
log
.
append
(
fmt
.
format
(
*
lines
))
for
row
in
data
:
for
row
in
data
:
print
(
fmt
.
format
(
*
row
))
log
.
append
(
fmt
.
format
(
*
row
))
return
'
\n
'
.
join
(
log
)
def
display_debug_result
(
self
,
sort_by_time
=
True
):
"""Displays the debugger result"""
print
(
self
.
get_debug_result
(
sort_by_time
))
def
save_tensors
(
params
):
def
save_tensors
(
params
):
"""Save parameter dictionary to binary bytes.
"""Save parameter dictionary to binary bytes.
...
...
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