mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-07-07 12:23:46 +02:00
Minor fix to the database script
This commit is contained in:
parent
395a0ef34e
commit
eab8d3cda1
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue