mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 06:58:11 -05:00
only CAPTURE_PROCESS_REPLAY=1 + add filterwarnings back [pr] (#10292)
This commit is contained in:
2
test/external/process_replay/README.md
vendored
2
test/external/process_replay/README.md
vendored
@@ -12,7 +12,7 @@ To run process replay locally:
|
||||
|
||||
(optional: clear previous process replay runs with `test/external/process_replay/reset.py`)
|
||||
|
||||
1. Run tests with `RUN_PROCESS_REPLAY=1` in your branch. This will capture the kernels.
|
||||
1. Run tests with `CAPTURE_PROCESS_REPLAY=1` in your branch. This will pickle process inputs to CACHEDB.
|
||||
2. Checkout master
|
||||
3. Run `test/external/process_replay/process_replay.py`
|
||||
|
||||
|
||||
2
test/external/process_replay/local.sh
vendored
2
test/external/process_replay/local.sh
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
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
|
||||
CAPTURE_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
|
||||
|
||||
@@ -15,7 +15,6 @@ PAGE_SIZE = getenv("PAGE_SIZE", 100)
|
||||
REF = os.getenv("GITHUB_REF_NAME", "")
|
||||
MAX_DIFF_PCT = getenv("PROCESS_REPLAY_MAX_DIFF_PCT", 20)
|
||||
TABLE_NAME = f"process_replay_{VERSION}"
|
||||
os.environ["RUN_PROCESS_REPLAY"] = "0"
|
||||
os.environ["CAPTURE_PROCESS_REPLAY"] = "0"
|
||||
early_stop = multiprocessing.Event()
|
||||
logging.basicConfig(level=logging.INFO, format="%(message)s")
|
||||
@@ -48,6 +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 early_stop.is_set(): return None
|
||||
conn = db_connection()
|
||||
cur = conn.cursor()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
python3 test/external/process_replay/reset.py
|
||||
RUN_PROCESS_REPLAY=1 pytest -n auto test/test_tiny.py test/test_uop_graph.py test/test_ops.py test/test_linearizer.py
|
||||
CAPTURE_PROCESS_REPLAY=1 pytest -n auto test/test_tiny.py test/test_uop_graph.py test/test_ops.py test/test_linearizer.py
|
||||
while true; do
|
||||
if python3 test/test_tiny.py; then
|
||||
PYTHONPATH="." python3 test/external/process_replay/process_replay.py
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
@@ -228,7 +228,7 @@ def diskcache(func):
|
||||
|
||||
# *** process replay ***
|
||||
|
||||
CAPTURE_PROCESS_REPLAY = getenv("RUN_PROCESS_REPLAY") or getenv("CAPTURE_PROCESS_REPLAY")
|
||||
CAPTURE_PROCESS_REPLAY = getenv("CAPTURE_PROCESS_REPLAY")
|
||||
|
||||
# *** http support ***
|
||||
|
||||
|
||||
Reference in New Issue
Block a user