From 58eebdb507506b2c0c1f5e22bf271b9659381d63 Mon Sep 17 00:00:00 2001 From: George Hotz <72895+geohot@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:43:39 -0700 Subject: [PATCH] don't reassign metadata to the same uop + ignore oob in pr [pr] (#10737) --- .github/actions/process-replay/action.yml | 2 +- tinygrad/uop/ops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/process-replay/action.yml b/.github/actions/process-replay/action.yml index 2a05afd13e..efd2e1fc59 100644 --- a/.github/actions/process-replay/action.yml +++ b/.github/actions/process-replay/action.yml @@ -11,5 +11,5 @@ runs: git fetch origin $CURRENT_SHA export COMMIT_MESSAGE=$(git show -s --format=%B "$CURRENT_SHA") export CURRENT_HEAD=$(git rev-parse HEAD) - cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py + cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && IGNORE_OOB=1 PYTHONPATH=. python3 process_replay.py git checkout $CURRENT_HEAD # restore to branch diff --git a/tinygrad/uop/ops.py b/tinygrad/uop/ops.py index 5e06b71913..8c9071fe3e 100644 --- a/tinygrad/uop/ops.py +++ b/tinygrad/uop/ops.py @@ -1035,7 +1035,7 @@ def graph_rewrite_map(sink:UOp, pm:PatternMatcher, ctx=None, bottom_up=False, na new_map: dict[UOp, UOp] = {} for k in sink.toposort(): new_map[k] = v = rewrite_ctx.unified_rewrite(k, bottom_up) - if k.metadata is not None: all_metadata[v] = tuple(dedup(all_metadata.get(v, ())))+k.metadata + if k is not v and k.metadata is not None: all_metadata[v] = tuple(dedup(all_metadata.get(v, ())))+k.metadata if input_map is not None: for k,v in input_map.items(): new_map[k] = new_map.get(v,v) return new_map