Skip to content
Snippets Groups Projects
Commit 46847176 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Adding measured network times over 4G LTE network

parent b90abbe4
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@ ResNet50.binary_path = "resnet_imagenet"
ResNet50.binary_time = 3.85 * 100 # 50 images * 100 batches
ResNet50.batch_time = 3.85 # Time for batch with 50 images
ResNet50.num_layers = 53
ResNet50.data_size = 50 * 3 * 224 * 224
ResNet50.data_size = 50 * 3 * 224 * 224 * 4 # *4 for Float32 Data
ResNet50.num_classes = 1000
ResNet50.batch_size = 50
......@@ -29,8 +31,9 @@ VGG16_ImageNet.binary_path = "vgg16_imagenet"
VGG16_ImageNet.binary_time = 4.55 * 100 # 50 images * 100 batches
VGG16_ImageNet.batch_time = 4.55
VGG16_ImageNet.num_layers = 16
VGG16_ImageNet.data_size = 50 * 3 * 224 * 224
VGG16_ImageNet.data_size = 50 * 3 * 224 * 224 * 4
VGG16_ImageNet.num_classes = 1000
VGG16_ImageNet.batch_size = 50
AlexNet_ImageNet = Benchmark()
......@@ -38,7 +41,9 @@ AlexNet_ImageNet.binary_path = "alexnet_imagenet"
AlexNet_ImageNet.binary_time = 0.66 * 100
AlexNet_ImageNet.batch_time = 0.66
AlexNet_ImageNet.num_layers = 8
AlexNet_ImageNet.data_size = 50 * 3 * 224 * 224
AlexNet_ImageNet.data_size = 50 * 3 * 224 * 224 * 4
AlexNet_ImageNet.num_classes = 1000
AlexNet_ImageNet.batch_size = 50
......@@ -51,6 +56,9 @@ promise_knobs = 7
total_machines = 100
total_confs = 50
download_time_per_1MB = (6.1 * 60) / 100 # 6.1 mins over 4G LTE network for 100 MB data upload
upload_time_per_1MB = (26.4 * 60) / 100 # 26.4 mins over 4G LTE network for 100 MB data upload
......@@ -77,7 +85,7 @@ def getErrorProfileTime(Bench):
def getConfTime(Bench):
conf_per_machine = promise_conf_runs * (total_confs * 1.0/ total_machines)
conf_per_machine = promise_conf_runs * (total_confs * 1.0 / total_machines)
conf_time = conf_per_machine * Bench.binary_time
return conf_time
......@@ -85,13 +93,32 @@ def getConfTime(Bench):
def getNetworkTime(Bench):
# Calibration Download Time
download_data_MB = Bench.data_size / 1000000
download_data_time = download_data_MB * download_time_per_1MB
# Profile Uploading (to Cloud Server) Time
total_knobs = (promise_knobs + 1) * Bench.num_layers
profile_size = total_knobs * Bench.batch_size * Bench.num_classes * 4 # *4 for FP32 data
profile_size_MB = profile_size / 1000000
upload_data_time = profile_size_MB * upload_time_per_1MB
network_time = download_data_time + upload_data_time
return network_time
def getTimeOnEdge(Bench):
err_time = getErrorProfileTime(Bench)
conf_time = getConfTime(Bench)
network_time = getNetworkTime(Bench)
total_time = err_time + conf_time
total_time = err_time + conf_time + network_time
total_time = total_time / 60
return total_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