summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-11-19 16:31:08 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-11-19 16:31:08 +0100
commita3a8b44f598b3eca18ab226112bf5c2bc3b19df8 (patch)
treed9302e2e174817b91142739c254211cef0317acb /scripts
parentc6690df8962dc48112558c09531eeda9d93d1e97 (diff)
Some fixed for the new auto-tuner to be compatible with the Python scripts
Diffstat (limited to 'scripts')
-rw-r--r--scripts/database/database/clblast.py1
-rw-r--r--scripts/database/database/io.py8
2 files changed, 8 insertions, 1 deletions
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"]