From 75cea16da6ce8f7f777bd79ebe2775cb5bd5ea56 Mon Sep 17 00:00:00 2001 From: Floris-Jan Willemsen Date: Thu, 11 Jan 2024 09:50:54 +0100 Subject: [PATCH] Minor improvements --- .../methodology_paper_evaluation.json | 76 +++++++++++++++++++ .../methodology_paper_example.json | 75 ------------------ src/autotuning_methodology/baseline.py | 2 +- 3 files changed, 77 insertions(+), 76 deletions(-) create mode 100644 experiment_files/methodology_paper_evaluation.json delete mode 100644 experiment_files/methodology_paper_example.json diff --git a/experiment_files/methodology_paper_evaluation.json b/experiment_files/methodology_paper_evaluation.json new file mode 100644 index 0000000..6b16136 --- /dev/null +++ b/experiment_files/methodology_paper_evaluation.json @@ -0,0 +1,76 @@ +{ + "version": "0.1.2", + "name": "Methodology paper evaluation", + "folder_id": "methodology_paper_evaluation", + "kernels_path": "../cached_data_used/kernels", + "bruteforced_caches_path": "../cached_data_used/cachefiles", + "visualization_caches_path": "../cached_data_used/visualizations", + "kernels": [ + "pnpoly", + "convolution" + ], + "GPUs": [ + "RTX_2080_Ti", + "RTX_3090" + ], + "minimization": true, + "resolution": 1e3, + "cutoff_percentile": 0.96, + "cutoff_percentile_start": 0.5, + "cutoff_type": "fevals", + "objective_time_keys": [ + "compilation", + "benchmark", + "framework", + "search_algorithm", + "validation" + ], + "objective_performance_keys": [ + "time" + ], + "plot": { + "plot_x_value_types": [ + "fevals", + "time", + "aggregated" + ], + "plot_y_value_types": [ + "normalized", + "baseline" + ], + "confidence_level": 0.95, + "compare_baselines": false, + "compare_split_times": false + }, + "strategy_defaults": { + "repeats": 100, + "minimum_number_of_evaluations": 20, + "stochastic": true, + "record_data": [ + "time", + "GFLOP/s" + ] + }, + "strategies": [ + { + "name": "genetic_algorithm", + "strategy": "genetic_algorithm", + "display_name": "Genetic Algorithm" + }, + { + "name": "particle_swarm_optimization", + "strategy": "pso", + "display_name": "PSO" + }, + { + "name": "firefly", + "strategy": "firefly_algorithm", + "display_name": "Firefly" + }, + { + "name": "differential_evolution", + "strategy": "diff_evo", + "display_name": "Differential Evolution" + } + ] +} \ No newline at end of file diff --git a/experiment_files/methodology_paper_example.json b/experiment_files/methodology_paper_example.json deleted file mode 100644 index 86a5546..0000000 --- a/experiment_files/methodology_paper_example.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": "0.1.2", - "name": "Methodology paper evaluation", - "folder_id": "methodology_paper_evaluation", - "kernels_path": "../cached_data_used/kernels", - "bruteforced_caches_path": "../cached_data_used/cachefiles", - "visualization_caches_path": "../cached_data_used/visualizations", - "kernels": [ - "pnpoly", - "convolution" - ], - "GPUs": [ - "RTX_2080_Ti", - "RTX_3090" - ], - "minimization": true, - "resolution": 1e3, - "cutoff_percentile": 0.96, - "cutoff_percentile_start": 0.5, - "cutoff_type": "fevals", - "objective_time_keys": [ - "compilation", - "benchmark", - "framework", - "search_algorithm", - "validation" - ], - "objective_performance_keys": [ - "time" - ], - "plot": { - "plot_x_value_types": [ - "time", - "aggregated" - ], - "plot_y_value_types": [ - "normalized", - "baseline" - ], - "confidence_level": 0.95, - "compare_baselines": false, - "compare_split_times": false - }, - "strategy_defaults": { - "repeats": 100, - "minimum_number_of_evaluations": 20, - "stochastic": true, - "record_data": [ - "time", - "GFLOP/s" - ] - }, - "strategies": [ - { - "name": "genetic_algorithm", - "strategy": "genetic_algorithm", - "display_name": "Genetic Algorithm" - }, - { - "name": "particle_swarm_optimization", - "strategy": "pso", - "display_name": "PSO" - }, - { - "name": "firefly", - "strategy": "firefly_algorithm", - "display_name": "Firefly" - }, - { - "name": "differential_evolution", - "strategy": "diff_evo", - "display_name": "Differential Evolution" - } - ] -} \ No newline at end of file diff --git a/src/autotuning_methodology/baseline.py b/src/autotuning_methodology/baseline.py index 09afc9c..379839c 100644 --- a/src/autotuning_methodology/baseline.py +++ b/src/autotuning_methodology/baseline.py @@ -174,7 +174,7 @@ def get_curve_over_time(self, time_range: np.ndarray, dist=None, confidence_leve smoothing_factor = 0.0 if smoothing_factor > 0.0: window_size = min(time_range.size, ceil(time_range.size * smoothing_factor)) - if time_range.size > 1 and window_size < 1: + if time_range.size > 1 and window_size > 1: curve_over_time = moving_average(curve_over_time, window_size) return curve_over_time