mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 22:48:25 -05:00
process replay kernel asts in toposort order [pr] (#9869)
* process replay kernel asts in toposort order [pr] * use HEAD replay
This commit is contained in:
1
test/external/process_replay/local.sh
vendored
1
test/external/process_replay/local.sh
vendored
@@ -4,5 +4,6 @@ HEAD=$(git rev-parse --abbrev-ref HEAD)
|
||||
python test/external/process_replay/reset.py
|
||||
RUN_PROCESS_REPLAY=1 python test/test_ops.py TestOps.test_add
|
||||
git checkout master
|
||||
git checkout $HEAD -- test/external/process_replay/process_replay.py
|
||||
ASSERT_PROCESS_REPLAY=1 python test/external/process_replay/process_replay.py
|
||||
git checkout $HEAD
|
||||
|
||||
@@ -34,8 +34,8 @@ class ProcessReplayWarning(Warning): pass
|
||||
# *** recreators
|
||||
|
||||
def recreate_sched(big_sink:UOp) -> list[UOp]:
|
||||
sched_sink = get_becomes_map(big_sink)[0][big_sink]
|
||||
return dedup(u.src[1].arg.ast for u in sched_sink.toposort if u.op is Ops.ASSIGN)
|
||||
sched_sink = get_becomes_map(big_sink)[big_sink]
|
||||
return dedup(u.arg.ast for u in sched_sink.toposort if u.op is Ops.KERNEL)
|
||||
|
||||
def recreate_kernel(ast:UOp, opts:Renderer, applied_opts:list[Opt], name:str, _) -> str:
|
||||
k = Kernel(ast, opts=opts)
|
||||
|
||||
Reference in New Issue
Block a user