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
261ba350
Commit
261ba350
authored
4 years ago
by
hashimsharif
Browse files
Options
Downloads
Patches
Plain Diff
Adding scipt for jetson ime estimation
parent
4aeec2c2
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/bin/time_jetson_profiles.py
+94
-0
94 additions, 0 deletions
llvm/projects/hpvm-tensor-rt/bin/time_jetson_profiles.py
with
94 additions
and
0 deletions
llvm/projects/hpvm-tensor-rt/bin/time_jetson_profiles.py
0 → 100644
+
94
−
0
View file @
261ba350
class
Benchmark
:
def
__init__
(
self
):
self
.
binary_path
=
""
self
.
binary_time
=
0
self
.
num_layers
=
0
ResNet50
=
Benchmark
()
ResNet50
.
binary_path
=
"
resnet_imagenet
"
ResNet50
.
binary_time
=
5.1
*
60
# 5.1 mins * 60 secs/min
ResNet50
.
num_layers
=
53
VGG16_ImageNet
=
Benchmark
()
VGG16_ImageNet
.
binary_path
=
"
vgg16_imagenet
"
VGG16_ImageNet
.
binary_time
=
10.6
*
60
# 5.1 mins * 60 secs/min
VGG16_ImageNet
.
num_layers
=
16
# 100 batches with batch size of 50 each
batch_count
=
100
promise_conf_runs
=
30
# 30 runs for Statistical Confidence
promise_prof_runs
=
10
# 10 runs for error profile collection
promise_knobs
=
7
total_machines
=
100
total_confs
=
50
def
getErrorProfileTime
(
Bench
):
time_per_batch
=
Bench
.
binary_time
/
batch_count
total_knobs
=
promise_knobs
*
Bench
.
num_layers
total_runs
=
total_knobs
*
promise_prof_runs
promise_total_time
=
total_runs
*
time_per_batch
fp16_total_time
=
Bench
.
num_layers
*
time_per_batch
profile_time
=
promise_total_time
+
fp16_total_time
return
profile_time
def
getConfTime
(
Bench
):
conf_per_machine
=
promise_conf_runs
*
(
total_confs
*
1.0
/
total_machines
)
conf_time
=
conf_per_machine
*
Bench
.
binary_time
return
conf_time
def
getTimeOnEdge
(
Bench
):
err_time
=
getErrorProfileTime
(
Bench
)
conf_time
=
getConfTime
(
Bench
)
total_time
=
err_time
+
conf_time
total_time
=
total_time
/
60
return
total_time
if
__name__
==
"
__main__
"
:
resnet50_time
=
getTimeOnEdge
(
ResNet50
)
print
(
"
*** ResNet50 time (mins) =
"
,
resnet50_time
)
vgg16_img_time
=
getTimeOnEdge
(
VGG16_ImageNet
)
print
(
"
*** VGG16 time (mins) =
"
,
vgg16_img_time
)
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