summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/database/database.py2
-rw-r--r--scripts/database/database/clblast.py1
-rw-r--r--scripts/database/database/io.py8
3 files changed, 9 insertions, 2 deletions
diff --git a/scripts/database/database.py b/scripts/database/database.py
index 8f3ccce6..28f6ebf8 100755
--- a/scripts/database/database.py
+++ b/scripts/database/database.py
@@ -127,7 +127,7 @@ def main(argv):
# Removes database entries before continuing
if cl_args.remove_device is not None:
print("[database] Removing all results for device '%s'" % cl_args.remove_device)
- remove_database_entries(database, {"clblast_device": cl_args.remove_device})
+ remove_database_entries(database, {"clblast_device_name": cl_args.remove_device})
io.save_database(database, database_filename)
# Retrieves the best performing results
diff --git a/scripts/database/database/clblast.py b/scripts/database/database/clblast.py
index 2b4f734c..1a541fff 100644
--- a/scripts/database/database/clblast.py
+++ b/scripts/database/database/clblast.py
@@ -173,7 +173,6 @@ def print_cpp_database(database, output_dir):
kernels = sorted(set([s["kernel"] for s in device_database]))
for kernel in kernels:
kernel_database = [s for s in device_database if s["kernel"] == kernel]
-
assert len(kernel_database) == 1
results = kernel_database[0]["results"]
diff --git a/scripts/database/database/io.py b/scripts/database/database/io.py
index 15a39cc1..29d47591 100644
--- a/scripts/database/database/io.py
+++ b/scripts/database/database/io.py
@@ -83,6 +83,14 @@ def load_tuning_results(filename):
# Removes the numbering following the kernel family name
json_data["kernel_family"] = re.sub(r'_\d+', '', json_data["kernel_family"])
+ # Removes unnecessary data
+ if json_data["best_kernel"]:
+ del json_data["best_kernel"]
+ if json_data["best_time"]:
+ del json_data["best_time"]
+ if json_data["best_parameters"]:
+ del json_data["best_parameters"]
+
# Adds the kernel name to the section instead of to the individual results
assert len(json_data["results"]) > 0
json_data["kernel"] = json_data["results"][0]["kernel"]