diff --git a/llvm/projects/hpvm-tensor-rt/bin/times.py b/llvm/projects/hpvm-tensor-rt/bin/times.py new file mode 100644 index 0000000000000000000000000000000000000000..082b0d91acb19e70a6c217b25f8747f3197b45b7 --- /dev/null +++ b/llvm/projects/hpvm-tensor-rt/bin/times.py @@ -0,0 +1,78 @@ + + + +class Config: + def __init__(self): + self.runtime = 0 + self.fed_runs = 0 + self.full_runs = 0 + + +def computeTimes(bench): + + conf_runs = 60 + fed_time = (bench.runtime * 100) + (bench.fed_runs * conf_runs * bench.runtime) + fed_time_hrs = fed_time / (60*60) + + full_time = (bench.runtime * 1000) + (bench.full_runs * conf_runs * bench.runtime) + full_time_hrs = full_time / (60*60) + + print ("fedtime_hrs = ", fed_time_hrs, " full_time_hrs = ", full_time_hrs, "\n") + + + +if __name__ == "__main__": + + + resnet = Config() + resnet.runtime = 8 + resnet.fed_runs = 3 + resnet.full_runs = 5 + + computeTimes(resnet) + + alexnet = Config() + alexnet.runtime = 7.8 + alexnet.fed_runs = 47 + alexnet.full_runs = 274 + + computeTimes(alexnet) + + alexnet2 = Config() + alexnet2.runtime = 2.3 + alexnet2.fed_runs = 62 + alexnet2.full_runs = 339 + + computeTimes(alexnet2) + + vgg1 = Config() + vgg1.runtime = 7.4 + vgg1.fed_runs = 15 + vgg1.full_runs = 211 + + computeTimes(vgg1) + + + vgg2 = Config() + vgg2.runtime = 15.4 + vgg2.fed_runs = 8 + vgg2.full_runs = 150 + + computeTimes(vgg2) + + + lenet = Config() + lenet.runtime = 0.98 + lenet.fed_runs = 64 + lenet.full_runs = 228 + + computeTimes(lenet) + + + mobilenet = Config() + mobilenet.runtime = 11 + mobilenet.fed_runs = 32 + mobilenet.full_runs = 267 + + computeTimes(mobilenet) +