Skip to content

Instantly share code, notes, and snippets.

@huanzhang12
Created April 2, 2020 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huanzhang12/973e7dba1c230c18bf7e7393d4d6875c to your computer and use it in GitHub Desktop.
Save huanzhang12/973e7dba1c230c18bf7e7393d4d6875c to your computer and use it in GitHub Desktop.
Patch miopen.db for gfx803 GPUs with 32 CUs
#!/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