summaryrefslogtreecommitdiff
path: root/scripts/database
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-06-19 14:55:17 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-06-19 14:55:17 +0200
commiteab8d3cda11862b30b42aacbbb2de04db29e2a5e (patch)
tree87de220e40536e9223c9cc1eed055dc48e4e97b8 /scripts/database
parent395a0ef34e2735eb9d08292238e92d41132dfaac (diff)
Minor fix to the database script
Diffstat (limited to 'scripts/database')
-rw-r--r--scripts/database/database.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/database/database.py b/scripts/database/database.py
index 4ca184c5..49bc1801 100644
--- a/scripts/database/database.py
+++ b/scripts/database/database.py
@@ -143,7 +143,8 @@ def CalculateDefaults(df):
groups = dfdefault.groupby(DEVICETYPE_ATTRIBUTES+KERNEL_ATTRIBUTES+["kernel"])
for name, dfgroup in groups:
if len(dfgroup) != 1:
- print("[WARNING] Entries for a single kernel with multiple argument values")
+ description = dfgroup["kernel"].min() + " " + dfgroup["device_vendor"].min()
+ print("[WARNING] Entries for a single kernel with multiple argument values: " + description)
# Defaults in general
groups = df.groupby(KERNEL_ATTRIBUTES+ARGUMENT_ATTRIBUTES+["kernel"])
@@ -218,7 +219,7 @@ def PrintData(df, outputdir):
# Iterates over the kernel families: creates a new file per family
for family, dffamily in df.groupby(["kernel_family"]):
dffamily = dffamily.dropna(axis=1, how='all')
- f = open(os.path.join(outputdir, family+'.h'), 'w+')
+ f = open(os.path.join(outputdir, family+'.hpp'), 'w+')
f.write(GetHeader(family))
# Loops over the different entries for this family and prints their headers
@@ -301,6 +302,11 @@ if len(glob.glob(glob_json)) >= 1:
print("## Storing the database to disk...")
SaveDatabase(database, file_db)
+# Optional: update the database here. Default is disabled, code below is just an example
+if False:
+ database = UpdateDatabase(database, ((database["kernel"] == "CopyMatrixFast") & (database["precision"] == "3232")), "arg_alpha", "2+0.5i")
+ SaveDatabase(database, file_db)
+
# Retrieves the best performing results
print("## Calculating the best results per device/kernel...")
bests = GetBestResults(database)