Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
276a50e5
Commit
276a50e5
authored
5 years ago
by
Elizabeth
Browse files
Options
Downloads
Patches
Plain Diff
Added support for command line args
parent
67075e41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/projects/hpvm-tensor-rt/build_pldi/table_generator.py
+19
-4
19 additions, 4 deletions
llvm/projects/hpvm-tensor-rt/build_pldi/table_generator.py
with
19 additions
and
4 deletions
llvm/projects/hpvm-tensor-rt/build_pldi/table_generator.py
+
19
−
4
View file @
276a50e5
...
@@ -2,9 +2,21 @@ import glob
...
@@ -2,9 +2,21 @@ import glob
import
os
import
os
import
subprocess
import
subprocess
import
shutil
import
shutil
import
sys
from
collections
import
defaultdict
from
collections
import
defaultdict
'''
FORMAT
** LayerName NumOpsInLayer <cols>
OpName Col1Val Col2Val ...
** Conv1 1 h2f_time h2f_energy fp32_time fp32_energy f2h_time f2h_energy fp16_perf_time fp16_perf_energy fp16_time fp16_energy
Conv1 51.8808 97.2844 319.582 601.966 12.81 18.758 388.092 650.649 340.037 590.664
'''
class
TableGenerator
:
class
TableGenerator
:
__ops_header_delimiter
=
"
#
"
__ops_header_delimiter
=
"
#
"
...
@@ -53,7 +65,7 @@ class TableGenerator:
...
@@ -53,7 +65,7 @@ class TableGenerator:
3. Writes the internal table to <network_name>_tensors.txt file and uses the
3. Writes the internal table to <network_name>_tensors.txt file and uses the
<network_name>_ops.txt file as a guideline in terms of row order
<network_name>_ops.txt file as a guideline in terms of row order
'''
'''
self
.
__run_inputted_binaries
()
#
self.__run_inputted_binaries()
self
.
__build_internal_table
()
self
.
__build_internal_table
()
self
.
__output_table_to_file
()
self
.
__output_table_to_file
()
...
@@ -282,8 +294,11 @@ class TableGenerator:
...
@@ -282,8 +294,11 @@ class TableGenerator:
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
binary_dir_path
=
"
/home/nvidia/Gitlab/hpvm/llvm/projects/hpvm-tensor-rt/build_pldi/mobilenet
"
if
len
(
sys
.
argv
)
!=
4
:
num_iters
=
1
print
(
"
python table_generator.py <binary dir path> <num itrs> <profiler bin path>
"
)
profiler_binary_name
=
"
/home/nvidia/awesome_profiler/pp
"
exit
(
1
)
binary_dir_path
=
sys
.
argv
[
1
]
num_iters
=
int
(
sys
.
argv
[
2
])
profiler_binary_name
=
sys
.
argv
[
3
]
table_gen
=
TableGenerator
(
binary_dir_path
,
num_iters
,
profiler_binary_name
)
table_gen
=
TableGenerator
(
binary_dir_path
,
num_iters
,
profiler_binary_name
)
table_gen
.
generate_table
()
table_gen
.
generate_table
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment