Untimed physical-leaf/fluid health after warm-up and after each timed window using the existing runner limits (finite macros, rho in [0.5,1.5], max Mach <= 0.2); refined masks as in run_refined_dfg. Parity comparator rejects unequal level counts and any infinity; matching NaN stays allowed only as a storage mask. Regression tests for both. No numerical gate or production change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
2.6 KiB
Markdown
40 lines
2.6 KiB
Markdown
# Refined DFG MRT timing harness (measurement only)
|
|
|
|
`tests/validation/time_refined_dfg.py` times the matched MRT refined/uniform DFG Re100 setup of
|
|
`run_refined_dfg.py` (same configuration, geometry and initial state functions). No numerical,
|
|
physics-gate or production change; no force or accuracy result is produced.
|
|
|
|
| Variant | Loop | Force history |
|
|
|---|---|---|
|
|
| A | refined `step(1)` + `read_raw_exchange` per base step (as the runner) | valid |
|
|
| B | refined `step(1)` only, no host reads (`observe_raw_exchange` stays on) | timing-only |
|
|
| C | refined single `step(N)` | timing-only; ledger keeps the final base interval only |
|
|
| E | uniform `sim.run(<=100)` + `read_force` (as the runner) | valid |
|
|
| E' | uniform single `sim.run(2N)` | timing-only; at most a whole-window average, different summation order |
|
|
|
|
- Equal simulated duration: N refined base steps vs 2N uniform D80 steps.
|
|
- Every repeat starts from the same fresh state (refined `initialize`, uniform `snapshot/restore`)
|
|
and the same warm-up; construction/JIT, warm-up, downloads and parity checks are untimed.
|
|
- The actual stepping stream is synchronized explicitly before and after each timed loop; the
|
|
wall timer (`time.perf_counter`) is the only source. No CUDA-event span is called kernel time.
|
|
- `--max-wall-seconds` is required for GPU runs (outer timeout, checked between variants and
|
|
every 100 steps in per-step loops).
|
|
- Final populations and NaN masks must be bitwise identical to the first A repeat (A/B/C) or the
|
|
first E repeat (E/E'); refined and uniform grids are never compared. Leaf/fluid populations
|
|
must be finite. Physical health (finite leaf/fluid macros, rho in [0.5, 1.5], max Mach <= 0.2,
|
|
the existing runner limits) is checked after warm-up and after each timed window. Matching NaN
|
|
is accepted only as a storage mask; any infinity or level-count mismatch fails parity. All
|
|
parity/health checks are untimed.
|
|
- Cases run sequentially (uniform, then refined) in one process with startup serialized;
|
|
variants are interleaved within each repeat. A-B and B-C are measured comparative
|
|
differences under GPU variability, not exact causal decompositions.
|
|
|
|
Usage (root selects one verified idle GPU):
|
|
|
|
PYTHONPATH=src python -m unittest tests/unit/test_time_refined_dfg.py
|
|
python tests/validation/time_refined_dfg.py --output <new> --plan
|
|
CUDA_VISIBLE_DEVICES=<gpu> python tests/validation/time_refined_dfg.py --output <new> --max-wall-seconds <s>
|
|
|
|
Defaults: 2000 base steps, 200 warm-up base steps, 3 repeats. Profiler capture and the
|
|
`observe_raw_exchange=False` variant are deferred until these measurements exist.
|