Created
April 2, 2020 03:59
-
-
Save huanzhang12/973e7dba1c230c18bf7e7393d4d6875c to your computer and use it in GitHub Desktop.
Patch miopen.db for gfx803 GPUs with 32 CUs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sqlite3 | |
conn = sqlite3.connect('miopen.db') | |
c = conn.cursor() | |
total_items = c.execute("SELECT COUNT() FROM perf_db").fetchone()[0] | |
# columns ['id', 'solver', 'config', 'arch', 'num_cu', 'params'] | |
c.execute("SELECT * FROM perf_db WHERE arch=='gfx803' AND num_cu==36;") | |
rows = c.fetchall() | |
new_items = [] | |
index = total_items | |
for r in rows: | |
index += 1 | |
new_items.append((index, r[1], r[2], 'gfx803', 32, r[5])) | |
c.executemany("INSERT INTO perf_db VALUES (?, ?, ?, ?, ?, ?)", new_items) | |
conn.commit() | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment