From 3c73c4f8b2400c6922e54e36f835afda3e9fe656 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@tyler.cs.illinois.edu> Date: Thu, 7 May 2020 05:29:18 -0500 Subject: [PATCH] Adding seeding capability to Autotuner --- .../autotuner/opentuner/autotuner/devtuner.py | 10 ++++++- .../autotuner/tuner_driver_src/benchmarks.py | 26 ++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/llvm/projects/hpvm-tensor-rt/autotuner/opentuner/autotuner/devtuner.py b/llvm/projects/hpvm-tensor-rt/autotuner/opentuner/autotuner/devtuner.py index 86642a4961..9fc3b0912e 100644 --- a/llvm/projects/hpvm-tensor-rt/autotuner/opentuner/autotuner/devtuner.py +++ b/llvm/projects/hpvm-tensor-rt/autotuner/opentuner/autotuner/devtuner.py @@ -44,7 +44,8 @@ class TunerData: self.autotuner_runs = 0 self.best_speedup = 1 self.log_file = "" - + + self.use_seed = True @@ -199,6 +200,13 @@ class DevTuner(MeasurementInterface): return manipulator + + + def seed_configurations(self): + """Provide baseline config as seed if model uses seed.""" + baseline_config = {layer: 11 for layer in self.tunerData.tuning_flags} + return [baseline_config] if self.tunerData.use_seed else [] + def run(self, desired_result, input, limit): diff --git a/llvm/projects/hpvm-tensor-rt/autotuner/tuner_driver_src/benchmarks.py b/llvm/projects/hpvm-tensor-rt/autotuner/tuner_driver_src/benchmarks.py index 6668774034..f9def84e96 100644 --- a/llvm/projects/hpvm-tensor-rt/autotuner/tuner_driver_src/benchmarks.py +++ b/llvm/projects/hpvm-tensor-rt/autotuner/tuner_driver_src/benchmarks.py @@ -76,8 +76,28 @@ #-- batch_id = "batch327" -# IMP: Increased SAMPLING Knobs ---- Adding interpolation-based Knobs -batch_id = "batch328" +# IMP: Increased SAMPLING Knobs ---- Adding interpolation-based Knobs - 8K iterations +#---- batch_id = "batch328" + + +# IMP: Increased SAMPLING Knobs ---- Adding interpolation-based Knobs -- 12K +#-- batch_id = "batch329" + +# IMP: Increased SAMPLING Knobs ---- Adding interpolation-based Knobs -- 12K - NEW: 5K images calibration set +#-- batch_id = "batch330" + + +# IMP: Increased SAMPLING Knobs -- 20K iterations - NEW: 5K images calibration set -- fixed bugs +#-- batch_id = "batch331" + +# testing install-time tuner +#batch_id = "batch340" + +# First run of install time tuner +batch_id = "batch341" + +# Install Timer Tuner with FP32 SEEDING +batch_id = "batch342" @@ -402,7 +422,7 @@ MobileNet_SH.tuner_accuracy = 87.6 MobileNet_SH.promise_accuracy = 87.76 MobileNet_SH.validation_accuracy = 88.5 -bench_tuner_data["mobilenet_shallow"] = MobileNet_SH +#-- bench_tuner_data["mobilenet_shallow"] = MobileNet_SH -- GitLab