Skip to content
Snippets Groups Projects
Commit 261ba350 authored by hashimsharif's avatar hashimsharif
Browse files

Adding scipt for jetson ime estimation

parent 4aeec2c2
No related branches found
No related tags found
No related merge requests found
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment