From 19574b2519e723cbca0b0fa0964e8e5823c24911 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sat, 3 Sep 2016 12:44:11 +0200 Subject: Updated tuning results for Haswell GT2 Mobile GPU; fixed database script to handle duplicate entries of different runs --- scripts/database/database/defaults.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/database') diff --git a/scripts/database/database/defaults.py b/scripts/database/database/defaults.py index 8a02c201..73ad2bcf 100644 --- a/scripts/database/database/defaults.py +++ b/scripts/database/database/defaults.py @@ -84,6 +84,15 @@ def get_common_best(database, group_name, verbose): database = database.dropna(axis=1, how='all') database = database.reset_index() + # In case multiple runs for the exact same configuration where made: take just the best performing one into account + other_column_names = list(database.columns.values) + other_column_names.remove("time") + database_by_time = database.groupby(other_column_names) + if len(database_by_time) != len(database): + if verbose: + print("[database] " + str(group_name) + " keeping only entries with the lowest execution time") + database = database_by_time.apply(lambda x: x[x["time"] == x["time"].min()]) + # Inserts the relative execution times into the database def relative_performance(x): x["relative_performance"] = x["time"].min() / x["time"] -- cgit v1.2.3