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:
qazal
2025-04-13 17:20:34 +08:00
committed by GitHub
parent 7191f88551
commit e201bc3e93
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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)