don't raise Exception in process replay [pr] (#10392)

* don't raise Exception in process replay [pr]

* continue generating diffs unless [pr] is set, exit(1) otherwise

* change

* works
This commit is contained in:
qazal
2025-05-18 11:23:23 +03:00
committed by GitHub
parent 9b4e2a75cd
commit 9e2089dcd4

View File

@@ -47,7 +47,7 @@ def recreate_kernel(ast:UOp, opts:Renderer, applied_opts:list[Opt], name:str, _)
# *** diff a "good" recreation against the generated version
def diff(offset:int, name:str, fxn:Callable) -> None:
warnings.filterwarnings("error", category=ProcessReplayWarning)
if ASSERT_DIFF: warnings.filterwarnings("error", category=ProcessReplayWarning)
if early_stop.is_set(): return None
conn = db_connection()
cur = conn.cursor()
@@ -116,6 +116,7 @@ if __name__ == "__main__":
for name,fxn in [("schedule", recreate_sched), ("kernel", recreate_kernel)]:
logging.info(f"***** {name} diff")
try: _pmap(name, fxn)
except ProcessReplayWarning: exit(1)
except Exception as e:
if ASSERT_DIFF: raise e
logging.error(f"{name} diff err {e}")