summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-09-03 12:44:11 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-09-03 12:45:11 +0200
commit19574b2519e723cbca0b0fa0964e8e5823c24911 (patch)
tree541626748c46b30e235f3953539dc054cc62fe3f /scripts
parent478fb089d5b5105a2736079b26b20e415683649d (diff)
Updated tuning results for Haswell GT2 Mobile GPU; fixed database script to handle duplicate entries of different runs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/database/database/defaults.py9
1 files changed, 9 insertions, 0 deletions
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"]