mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-15 09:33:03 +08:00
restore process replay runs by their id (#5453)
This commit is contained in:
@@ -5,7 +5,7 @@ from tinygrad.codegen.kernel import Kernel
|
||||
from tinygrad.helpers import Context, ContextVar, colored, db_connection, VERSION, getenv, tqdm
|
||||
|
||||
page_size = 100
|
||||
table_name = f"process_replay_{getenv('GITHUB_SHA', 'HEAD')}_{VERSION}"
|
||||
table_name = f"process_replay_{getenv('GITHUB_RUN_ID', 'HEAD')}_{VERSION}"
|
||||
|
||||
def process_replay(offset:int):
|
||||
conn = db_connection()
|
||||
|
||||
2
test/external/process_replay/reset.py
vendored
2
test/external/process_replay/reset.py
vendored
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
from tinygrad.helpers import db_connection, VERSION, getenv
|
||||
cur = db_connection()
|
||||
cur.execute(f"drop table if exists process_replay_{getenv('GITHUB_SHA', 'HEAD')}_{VERSION}")
|
||||
cur.execute(f"drop table if exists process_replay_{getenv('GITHUB_RUN_ID', 'HEAD')}_{VERSION}")
|
||||
|
||||
@@ -760,7 +760,7 @@ class Kernel:
|
||||
self.linearize()
|
||||
src = self.opts.render(name:=to_function_name(self.name), self.uops)
|
||||
if getenv("RUN_PROCESS_REPLAY"):
|
||||
table_name = f"process_replay_{getenv('GITHUB_SHA', 'HEAD')}"
|
||||
table_name = f"process_replay_{getenv('GITHUB_RUN_ID', 'HEAD')}"
|
||||
diskcache_put(table_name, id(self), (self.ast, self.opts, self.applied_opts, name, src, {k:v.value for k,v in ContextVar._cache.items()}))
|
||||
info = get_lazyop_info(self.ast.src[0]) # TODO: this should be removed
|
||||
ops, mem = flops_mem(self.uops.uops)
|
||||
|
||||
Reference in New Issue
Block a user