diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbd7ab7b2e..12d9ae0726 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -508,6 +508,9 @@ jobs: run: TRANSCENDENTAL=2 python -m pytest -n=auto test/test_ops.py::TestOps::test_sin test/test_ops.py::TestOps::test_cos test/test_ops.py::TestOps::test_tan test/test_ops.py::TestOps::test_exp test/test_ops.py::TestOps::test_log --durations=20 - name: Run process replay tests run: | + if [ "${{ matrix.backend }}" == "amd" ]; then + MAX_DIFF_PCT=1 RUN_PROCESS_REPLAY=0 test/external/process_replay/test_process_replay.sh + fi export PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH") export COMMIT_MESSAGE=$(git show -s --format=%B ${{ github.event.pull_request.head.sha }}) 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 diff --git a/test/external/process_replay/test_process_replay.sh b/test/external/process_replay/test_process_replay.sh new file mode 100755 index 0000000000..79a2093ae1 --- /dev/null +++ b/test/external/process_replay/test_process_replay.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# should assert +sed -i 's/temp/temp1/g' ./tinygrad/codegen/lowerer.py +ASSERT_PROCESS_REPLAY=1 python3 test/external/process_replay/process_replay.py &> /dev/null +if [[ $? -eq 0 ]]; then + echo "PROCESS REPLAY IS WRONG." + exit 1 +fi +# should NOT assert +git stash > /dev/null +ASSERT_PROCESS_REPLAY=1 python3 test/external/process_replay/process_replay.py &> /dev/null