From c5c8c5dc637576381113d933e9fbc3a90f6fe8c1 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 25 Nov 2026 11:59:19 +0000 Subject: [PATCH 1/3] Compare native Nautilus fits with one persistent GPU and ordered CPU feeders --- experiments/nautilus_gpu_feed/pilot.py | 114 +++++++++++++ experiments/nautilus_gpu_feed/probe.py | 63 ++++++++ experiments/nautilus_gpu_feed/run.py | 215 +++++++++++++++++++++++++ 3 files changed, 392 insertions(+) create mode 100644 experiments/nautilus_gpu_feed/pilot.py create mode 100644 experiments/nautilus_gpu_feed/probe.py create mode 100644 experiments/nautilus_gpu_feed/run.py diff --git a/experiments/nautilus_gpu_feed/pilot.py b/experiments/nautilus_gpu_feed/pilot.py new file mode 100644 index 0000000..93d551b --- /dev/null +++ b/experiments/nautilus_gpu_feed/pilot.py @@ -0,0 +1,114 @@ +"""Run the local four-arm comparison sequentially in fresh processes.""" + +import argparse +import json +import os +import shutil +import statistics +import subprocess +import sys +import threading +import time +from pathlib import Path + +HERE = Path(__file__).resolve().parent + + +def monitor_gpu(stream, samples): + for line in stream: + fields = line.strip().split(",") + if len(fields) == 2 and all(f.strip().isdigit() for f in fields): + samples.append((time.time(), *map(int, fields))) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + args = parser.parse_args() + raw = args.directory.resolve() + raw.mkdir(parents=True, exist_ok=False) + cores = os.sched_getaffinity(0) + topology = Path("/sys/devices/system/cpu") + if ( + len(cores) != 4 + or len({(topology / f"cpu{c}/topology/thread_siblings_list").read_text() for c in cores}) + != 4 + ): + parser.error("Pin the pilot to four different physical cores with taskset") + order = ("gpu", "feed", "split", "cpu") + runs = [] + for seed in (1, 2): + for repeats in (1, 64): + for arm in order if (seed == 1) == (repeats == 1) else order[::-1]: + name = f"r{repeats}-s{seed}-{arm}" + folder = raw / name + env = { + **os.environ, + "JAX_PLATFORMS": "cpu" if arm == "cpu" else "cuda", + "JAX_ENABLE_X64": "true", + "XLA_PYTHON_CLIENT_PREALLOCATE": "false", + "JAX_ENABLE_COMPILATION_CACHE": "false", + "OPENBLAS_NUM_THREADS": "1", + "MKL_NUM_THREADS": "1", + "OMP_NUM_THREADS": "1", + } + samples = [] + monitor = None + if arm != "cpu": + smi = shutil.which("nvidia-smi") or "/usr/lib/wsl/lib/nvidia-smi" + monitor = subprocess.Popen( + [ + smi, + "--query-gpu=utilization.gpu,memory.used", + "--format=csv,noheader,nounits", + "-l", + "1", + ], + stdout=subprocess.PIPE, + text=True, + ) + reader = threading.Thread(target=monitor_gpu, args=(monitor.stdout, samples)) + reader.start() + try: + tic = time.perf_counter() + with (raw / (name + ".log")).open("w") as log: + subprocess.run( + [ + sys.executable, + str(HERE / "run.py"), + str(folder), + arm, + str(seed), + str(repeats), + ], + stdout=log, + stderr=subprocess.STDOUT, + check=True, + timeout=600, + env=env, + ) + process_wall = time.perf_counter() - tic + finally: + if monitor is not None: + monitor.terminate() + monitor.wait(timeout=10) + reader.join() + monitor.stdout.close() + row = json.loads((folder / "case.json").read_text()) + row["fresh_process_s"] = process_wall + if monitor is not None: + usage = [ + (u, m) for t, u, m in samples if row["start_epoch"] <= t <= row["end_epoch"] + ] + row["gpu_samples"] = len(usage) + row["device_util_mean_pct"] = ( + statistics.mean(u for u, _ in usage) if usage else None + ) + row["peak_device_memory_mib"] = max((m for _, m in usage), default=None) + runs.append(row) + (raw / "runs.json").write_text(json.dumps(runs, indent=2, allow_nan=False) + "\n") + print(name, round(row["fit_wall_s"], 2), row["objective_cache_sizes"], flush=True) + + +if __name__ == "__main__": + main() diff --git a/experiments/nautilus_gpu_feed/probe.py b/experiments/nautilus_gpu_feed/probe.py new file mode 100644 index 0000000..ef8441d --- /dev/null +++ b/experiments/nautilus_gpu_feed/probe.py @@ -0,0 +1,63 @@ +"""Check CPU/GPU likelihoods and tail masking before the timed fits.""" + +import json +import sys +from pathlib import Path + +import jax +import jax.numpy as jnp +import numpy as np +from autofit.non_linear.objective import evaluate_in_chunks +from run import Profile, baseline, prepare + + +def probe(): + x, data, noise = baseline.make_dataset() + rng = np.random.default_rng(4702) + theta = rng.uniform([1, 0.1, 1], [99, 45, 49], size=(137, 3)) + theta[:21] = rng.normal([50.034, 25.063, 10.0], [0.04, 0.08, 0.04], size=(21, 3)) + expected = np.array( + [ + -0.5 * np.sum(((data - baseline.Gaussian(*p).model_data_from(x)) / noise) ** 2) + for p in theta + ] + ) + rows = [] + for repeats in (1, 64): + analysis = Profile(repeats) + for width in (50, 100): + fun = jax.jit( + jax.vmap( + lambda p, analysis=analysis: analysis.log_likelihood_function( + baseline.Gaussian(*p) + ) + ) + ) + for length in (1, 17, 50, 99, 100, 137): + vals = np.asarray(evaluate_in_chunks(fun, theta[:length], width)) + np.testing.assert_allclose(vals, expected[:length], rtol=5e-12, atol=1e-8) + host = [] + for start in range(0, length, width): + real = theta[start : min(start + width, length)] + padded, _ = prepare(np.asarray, real, width - len(real)) + host.extend(np.asarray(fun(padded))[: len(real)]) + np.testing.assert_allclose(host, vals, rtol=5e-12, atol=1e-8) + assert fun._cache_size() in (1, 2) # NumPy and explicitly placed JAX inputs + rows.append( + dict( + repeats=repeats, + width=width, + max_abs_error=float(np.max(np.abs(vals - expected))), + lengths=[1, 17, 50, 99, 100, 137], + ) + ) + return dict( + device=jax.devices()[0].device_kind, + backend=jax.default_backend(), + fp64=jax.config.jax_enable_x64, + checks=rows, + ) + + +if __name__ == "__main__": + Path(sys.argv[1]).write_text(json.dumps(probe(), indent=2) + "\n") diff --git a/experiments/nautilus_gpu_feed/run.py b/experiments/nautilus_gpu_feed/run.py new file mode 100644 index 0000000..21c7ae0 --- /dev/null +++ b/experiments/nautilus_gpu_feed/run.py @@ -0,0 +1,215 @@ +"""One complete PyAutoFit search with a bounded, ordered host-to-device feeder.""" + +import argparse +import hashlib +import json +import os +import sys +import time +from concurrent.futures import ThreadPoolExecutor +from contextlib import ExitStack +from pathlib import Path +from unittest.mock import patch + +import jax +import jax.numpy as jnp +import numpy as np +from autofit.non_linear.objective import chunk_slices +from nautilus import Sampler +from nautilus.bounds import NeuralBound + +ROOT = Path(__file__).resolve().parents[2] +sys.path.insert(0, str(ROOT / "scripts/gaussian_x1/nautilus")) +import search_fit_breakdown as baseline + +ARMS = ("cpu", "gpu", "split", "feed") +clock = time.perf_counter + + +class Profile(baseline.af.Analysis): + def __init__(self, repeats): + super().__init__(use_jax=True) + x, data, noise = baseline.make_dataset() + self.x, self.data, self.noise = (jnp.asarray(np.tile(a, repeats)) for a in (x, data, noise)) + self.repeats = repeats + + def log_likelihood_function(self, instance): + prediction = ( + instance.normalization + / (instance.sigma * jnp.sqrt(2 * jnp.pi)) + * jnp.exp(-0.5 * ((self.x - instance.centre) / instance.sigma) ** 2) + ) + return -0.5 * jnp.sum(((self.data - prediction) / self.noise) ** 2) / self.repeats + + +def prepare(prior, points, pad): + start = clock() + physical = prior(points.copy()) + if pad: + physical = np.concatenate((physical, np.repeat(physical[-1:], pad, axis=0))) + return physical, clock() - start + + +class Feed: + def __init__(self, arm, pool): + self.width = 50 if arm in ("split", "feed") else 100 + self.pool = pool + self.points = [] + self.values = [] + self.times = [] + self.wait_s = self.collect_s = self.prepare_s = self.geometry_s = 0.0 + self.geometry_jobs = self.padded = self.chunks = 0 + self.cache_sizes = set() + self.native = {} + + def evaluate(self, sampler, points): + start = clock() + if not sampler.vectorized or sampler.pool_s or sampler.pool_l or sampler.blobs_dtype: + raise RuntimeError( + "The pilot requires the native vectorized, single-owner scalar likelihood" + ) + self.native = { + key: getattr(sampler, key) for key in ("n_live", "n_update", "n_batch", "n_networks") + } + spans = chunk_slices(len(points), self.width) + if not 1 <= len(spans) <= 2: + raise RuntimeError("Unexpected logical batch size") + jobs = [] + if self.pool is not None: + jobs = [ + self.pool.submit(prepare, sampler.prior, points[lo:hi], pad) + for lo, hi, pad in spans + ] + pending = [] + for i, (lo, hi, pad) in enumerate(spans): + wait = clock() + if jobs: + physical, cost = jobs[i].result() + self.wait_s += clock() - wait + else: + physical, cost = prepare(sampler.prior, points[lo:hi], pad) + self.prepare_s += cost + pending.append(sampler.likelihood(physical)) + self.padded += pad + collect = clock() + values = np.concatenate( + [ + np.asarray(result)[: hi - lo] + for result, (lo, hi, _) in zip(pending, spans, strict=True) + ] + ) + self.collect_s += clock() - collect + self.cache_sizes.add(sampler.likelihood.func.__self__._call._cache_size()) + if len(values) != len(points) or not np.isfinite(values).all(): + raise ValueError("Missing or non-finite likelihood") + sampler.n_like += len(values) + self.points.append(points.copy()) + self.values.append(values.copy()) + self.chunks += len(spans) + self.times.append(clock() - start) + return values, None + + def membership(self, original, bound, points): + if self.pool is None or len(points) < 1000: + return original(bound, points) + start = clock() + middle = len(points) // 2 + jobs = [ + self.pool.submit(original, bound, part) for part in (points[:middle], points[middle:]) + ] + mask = np.concatenate([job.result() for job in jobs]) + self.geometry_s += clock() - start + self.geometry_jobs += len(jobs) + return mask + + +def run(directory, arm, seed, repeats): + device = jax.devices()[0] + if device.platform != ("cpu" if arm == "cpu" else "gpu") or not jax.config.jax_enable_x64: + raise RuntimeError(f"Unexpected backend or precision: {device}") + baseline.af.conf.instance.push(new_path=ROOT / "config", output_path=directory / "output") + model = baseline.make_model() + analysis = Profile(repeats) + search = baseline.af.Nautilus( + name="gpu_feed", verbose=False, n_live=200, number_of_cores=1, seed=seed + ) + timer = baseline.ExclusiveTimer() + start_epoch = time.time() + process_start = time.process_time() + start = clock() + with ExitStack() as stack: + pool = stack.enter_context(ThreadPoolExecutor(max_workers=2)) if arm == "feed" else None + feed = Feed(arm, pool) + + def evaluate(sampler, points): + return feed.evaluate(sampler, points) + + original = NeuralBound.contains + + def contains(bound, points): + return feed.membership(original, bound, points) + + stack.enter_context(patch.object(Sampler, "evaluate_likelihood", evaluate)) + stack.enter_context(patch.object(NeuralBound, "contains", contains)) + stack.callback(baseline.instrument(timer)) + result = search.fit(model=model, analysis=analysis) + wall = clock() - start + cpu_s = time.process_time() - process_start + end_epoch = time.time() + samples = result.samples + weight = np.asarray(samples.weight_list) + weight /= weight.sum() + parameters = np.asarray(samples.parameter_lists) + mean = weight @ parameters + points = np.concatenate(feed.points) + values = np.concatenate(feed.values) + if len(values) != samples.samples_info["total_samples"] or not feed.times: + raise RuntimeError("Native accounting mismatch") + np.savez(directory / "draws.npz", points=points, log_l=values) + return dict( + arm=arm, + seed=seed, + repeats=repeats, + device=device.device_kind, + fit_wall_s=wall, + cpu_s=cpu_s, + start_epoch=start_epoch, + end_epoch=end_epoch, + native=feed.native, + calls=len(values), + batches=len(feed.times), + device_chunks=feed.chunks, + width=feed.width, + padding=feed.padded, + objective_cache_sizes=sorted(feed.cache_sizes), + first_batch_s=feed.times[0], + warm_batch_median_s=float(np.median(feed.times[1:])), + evaluation_wall_s=sum(feed.times), + prepare_worker_s=feed.prepare_s, + wait_for_prepare_s=feed.wait_s, + collect_s=feed.collect_s, + parallel_membership_s=feed.geometry_s, + membership_jobs=feed.geometry_jobs, + training_s=timer.totals["nn_training"], + bounds=timer.counts["bound_geometry"], + proposal_sha256=hashlib.sha256(points.tobytes()).hexdigest(), + logz=float(samples.log_evidence), + ess=float(1 / (weight @ weight)), + mean=mean.tolist(), + std=np.sqrt(weight @ (parameters - mean) ** 2).tolist(), + names=list(model.parameter_names), + affinity=sorted(os.sched_getaffinity(0)), + jax=jax.__version__, + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + parser.add_argument("arm", choices=ARMS) + parser.add_argument("seed", type=int) + parser.add_argument("repeats", type=int, choices=(1, 64)) + opts = parser.parse_args() + opts.directory.mkdir(parents=True, exist_ok=False) + row = run(opts.directory.resolve(), opts.arm, opts.seed, opts.repeats) + (opts.directory / "case.json").write_text(json.dumps(row, indent=2, allow_nan=False) + "\n") From eab920213bd291930ff9dca2c871daf821058fed Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 25 Nov 2026 11:59:52 +0000 Subject: [PATCH 2/3] Read executable counts from the wrapped PyAutoFit objective --- experiments/nautilus_gpu_feed/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/nautilus_gpu_feed/run.py b/experiments/nautilus_gpu_feed/run.py index 21c7ae0..b439faf 100644 --- a/experiments/nautilus_gpu_feed/run.py +++ b/experiments/nautilus_gpu_feed/run.py @@ -99,7 +99,7 @@ def evaluate(self, sampler, points): ] ) self.collect_s += clock() - collect - self.cache_sizes.add(sampler.likelihood.func.__self__._call._cache_size()) + self.cache_sizes.add(sampler.likelihood.func.__self__._call.__wrapped__._cache_size()) if len(values) != len(points) or not np.isfinite(values).all(): raise ValueError("Missing or non-finite likelihood") sampler.n_like += len(values) From 7db263c56cddd3c177aab815cce467b0393ed537 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 25 Nov 2026 12:16:28 +0000 Subject: [PATCH 3/3] Record paired whole-fit GPU feeder timings and all-draw parity checks --- experiments/nautilus_gpu_feed/README.md | 42 + experiments/nautilus_gpu_feed/compare.py | 102 ++ experiments/nautilus_gpu_feed/probes.json | 120 +++ experiments/nautilus_gpu_feed/result.json | 1170 +++++++++++++++++++++ 4 files changed, 1434 insertions(+) create mode 100644 experiments/nautilus_gpu_feed/README.md create mode 100644 experiments/nautilus_gpu_feed/compare.py create mode 100644 experiments/nautilus_gpu_feed/probes.json create mode 100644 experiments/nautilus_gpu_feed/result.json diff --git a/experiments/nautilus_gpu_feed/README.md b/experiments/nautilus_gpu_feed/README.md new file mode 100644 index 0000000..0a840af --- /dev/null +++ b/experiments/nautilus_gpu_feed/README.md @@ -0,0 +1,42 @@ +# Do CPU workers feeding a single GPU shorten a complete Nautilus fit? + +On this RTX 2060 laptop, two CPU feeder threads gave no repeatable whole-fit speedup on either workload. With the 100-point Gaussian profile, the feeder was 14.6% faster than the full-batch GPU control on seed 1 and 7.4% slower on seed 2. With 64 copies of the observations it was 2.6% faster and 11.2% slower, respectively. Neither workload met the registered requirement of at least 5% faster on both seeds and a win over the serial split control. Retain native serial training and the existing execution defaults. [Phase protocol](https://github.com/PyAutoLabs/autofit_profiling/issues/42). + +| Likelihood observations | Seed | CPU only | GPU, full batch | GPU, serial half batches | GPU, worker-fed half batches | +|---|---:|---:|---:|---:|---:| +| 100 | 1 | 44.76 s | 70.12 s | 52.16 s | 59.86 s | +| 100 | 2 | 47.88 s | 55.01 s | 47.50 s | 59.07 s | +| 6,400 | 1 | 40.35 s | 46.52 s | 44.16 s | 45.32 s | +| 6,400 | 2 | 48.57 s | 38.93 s | 55.70 s | 43.28 s | + +The primary clock includes the complete PyAutoFit `search.fit`, first objective compilation, worker lifecycle, normal output and checkpointing. The receipt also includes elapsed time for the fresh Python process from launch to exit. The CPU baseline uses the same FP64 JAX objective as the GPU arms. The 6,400-point diagnostic repeats the original data 64 times and averages the log likelihood, increasing the work per call while preserving the mathematical target. It is a synthetic cost change on the same model. [All case results and paired comparisons](result.json). + +## Where the fit spent its time + +Full-width GPU likelihood evaluation took 0.50–0.72 s per complete fit, or 0.78–1.61% of wall time. This includes the prior transform, first compilation, device dispatch and collection through host-visible likelihood values. At 100 observations the median warm logical batch took 3.99–4.01 ms with a serial GPU host and 5.51–6.70 ms with feeders. At 6,400 observations it took 6.76–7.00 ms and 8.07–8.16 ms, respectively. The CPU-only warm batch medians were 0.48 ms at 100 observations and 1.11–1.35 ms at 6,400. Feeding could also affect read-only sampler geometry. The faster whole-fit times in individual pairs cannot be attributed to it from the end-to-end clock alone. + +The full-width GPU runs spent 15.6–25.3 s in native neural training. The measurements used one shared WSL laptop and two seeds with reversed run orders. The first fit also built the Matplotlib font cache. Device-wide one-second polling recorded 91–99 MiB at peak across the GPU runs. The kernels were short relative to that sampling interval. Per-batch timings provide the finer measurement. This pilot leaves GPU-heavy observational models, CPU/GPU co-evaluation and multi-GPU execution open. + +## Execution and numerical checks + +All 16 fits ran sequentially with the same four physical CPU cores available, one numerical-library thread, 200 live points, an update interval of 200, logical batches of 100 and four native networks trained serially. The controller owned all RNG state and waited for the complete logical batch before admitting results. CPU-only and full-width GPU evaluated one vector of 100. Both half-width arms evaluated two ordered vectors of 50. For the feeder, two persistent CPU threads applied the native prior transform to the preselected proposals. They also split read-only neural membership checks on candidate arrays of at least 1,000 points. The controller alone owned the GPU and called the existing PyAutoFit objective. The two sub-batches could be outstanding within one logical batch. The result does not measure speculative proposal generation across adaptive boundaries. + +The feeder uses PyAutoFit’s existing `chunk_slices` contract. It repeats the last physical row to maintain a fixed device width and discards padded outputs before admission. Each scored fit used one cached compiled batched objective. All native batches happened to be full in these fits. Separate CPU and RTX 2060 probes exercised lengths 1, 17, 50, 99, 100 and 137 at both widths against the canonical `evaluate_in_chunks` helper and a NumPy reference, including points near the fitted peak. [Existing variable-batch task](https://github.com/PyAutoLabs/PyAutoMind/blob/main/draft/bug/autofit/vmap_jit_recompiles_per_nautilus_batch_length.md) · [Hardware probes](probes.json). + +All 119,200 admitted values passed the independent FP64 likelihood audit (absolute tolerance 1e-8, relative tolerance 5e-12). The largest absolute difference was 2.8e-9. All proposal hashes matched within each seed and workload. Paired log evidence agreed within 7.2e-15 and marginal means within 2.4e-12 posterior standard deviations. Native ESS was about 1,301 and 1,381 for seeds 1 and 2. All 16 native completion markers and per-fit likelihood counts reconciled. + +A preliminary attempt ended on the first batch because the cache counter was read from the wrapper. The corrected driver reads the compiled callable through `__wrapped__`. All scored cases started in fresh directories. PyAutoFit reported a nonfatal visualization warm-up warning in all arms. Quick updates were disabled and normal fit output completed. + +## Reproduction + +The measured host used an Intel i9-10885H, one NVIDIA GeForce RTX 2060 Max-Q (6 GiB), WSL2, Python 3.12.10, JAX and jaxlib 0.12.0.1, Nautilus 1.0.5, NumPy 2.2.6, SciPy 1.17.1 and scikit-learn 1.5.1. Make the pinned PyAutoFit and PyAutoNerves checkouts available on `PYTHONPATH` in a CUDA-capable JAX environment. Choose four CPU IDs on distinct physical cores. Use a new output directory. [PyAutoFit revision](https://github.com/PyAutoLabs/PyAutoFit/tree/911fe05e1c6b570df51789f0ab5b2cbf54c1f43a) · [PyAutoNerves revision](https://github.com/PyAutoLabs/PyAutoNerves/tree/7f3055b7f3d1967f372bdb41ee732135bca0e68d). + +```sh +export JAX_ENABLE_X64=true XLA_PYTHON_CLIENT_PREALLOCATE=false JAX_ENABLE_COMPILATION_CACHE=false +JAX_PLATFORMS=cpu python experiments/nautilus_gpu_feed/probe.py cpu-probe.json +JAX_PLATFORMS=cuda python experiments/nautilus_gpu_feed/probe.py cuda-probe.json +taskset -c 0,2,4,6 python experiments/nautilus_gpu_feed/pilot.py /path/to/fresh-output +python experiments/nautilus_gpu_feed/compare.py /path/to/fresh-output +``` + +The supervisor enforces one platform per process, retains the case logs and emits device names, software version, CPU time, sampled device usage, model counts, posterior summaries and fit times. This local phase uses the [canonical profiling producer task](https://github.com/PyAutoLabs/PyAutoPulse/blob/main/tasks/autofit_profiling_bootstrap.md). diff --git a/experiments/nautilus_gpu_feed/compare.py b/experiments/nautilus_gpu_feed/compare.py new file mode 100644 index 0000000..276aa4c --- /dev/null +++ b/experiments/nautilus_gpu_feed/compare.py @@ -0,0 +1,102 @@ +"""Audit all admitted likelihoods against NumPy and compare full-fit timings by seed.""" + +import argparse +import hashlib +import json +from pathlib import Path + +import numpy as np + + +def audit_draws(raw, row, x, data, noise): + case = raw / f"r{row['repeats']}-s{row['seed']}-{row['arm']}" + with np.load(case / "draws.npz") as saved: + points = saved["points"] + values = saved["log_l"] + assert points.shape == (row["calls"], 3) and len(values) == row["calls"] + assert hashlib.sha256(points.tobytes()).hexdigest() == row["proposal_sha256"] + bounds = {"centre": 100, "normalization": 50, "sigma": 50} + physical = dict( + zip(row["names"], (points * np.array([bounds[n] for n in row["names"]])).T, strict=True) + ) + sigma = physical["sigma"][:, None] + prediction = ( + physical["normalization"][:, None] + / (sigma * np.sqrt(2 * np.pi)) + * np.exp(-0.5 * ((x - physical["centre"][:, None]) / sigma) ** 2) + ) + expected = -0.5 * np.square((data - prediction) / noise).sum(axis=1) + np.testing.assert_allclose(values, expected, atol=1e-8, rtol=5e-12) + info = json.loads(next(case.rglob("samples_info.json")).read_text()) + assert row["logz"] == info["log_evidence"] and row["calls"] == info["total_samples"] + assert row["native"] == {"n_live": 200, "n_update": 200, "n_networks": 4, "n_batch": 100} + assert row["ess"] >= 500 and len(list(case.rglob(".completed"))) == 1 + assert ( + row["objective_cache_sizes"] == [1] + and row["device_chunks"] * row["width"] == row["calls"] + row["padding"] + ) + if row["arm"] == "feed": + assert row["membership_jobs"] > 0 and row["wait_for_prepare_s"] > 0 + return float(np.max(np.abs(expected - values))) + + +def compare(raw): + runs = json.loads((raw / "runs.json").read_text()) + groups = {(row["repeats"], row["seed"], row["arm"]): row for row in runs} + if len(runs) != 16 or len(groups) != 16: + raise ValueError("Expected four distinct arms per seed and data size") + x = np.arange(100) + noise = 0.01 + data = 25 / (10 * np.sqrt(2 * np.pi)) * np.exp( + -0.5 * ((x - 50) / 10) ** 2 + ) + np.random.RandomState(1).normal(0, noise, 100) + for row in runs: + row["max_abs_numpy_error"] = audit_draws(raw, row, x, data, noise) + pairs = [] + for repeats in (1, 64): + for seed in (1, 2): + rows = {arm: groups[repeats, seed, arm] for arm in ("cpu", "gpu", "split", "feed")} + gpu = rows["gpu"] + feed = rows["feed"] + flags = {} + for arm, row in rows.items(): + flags[arm] = { + "trajectory_equal": row["proposal_sha256"] == gpu["proposal_sha256"], + "logz_delta": row["logz"] - gpu["logz"], + "max_mean_shift_sd": float( + np.max(np.abs(np.array(row["mean"]) - gpu["mean"]) / gpu["std"]) + ), + "ess_relative_delta": row["ess"] / gpu["ess"] - 1, + } + parity = all( + abs(f["logz_delta"]) <= 0.1 + and f["max_mean_shift_sd"] <= 0.1 + and abs(f["ess_relative_delta"]) <= 0.1 + for f in flags.values() + ) + saved = { + arm: 100 * (1 - feed["fit_wall_s"] / rows[arm]["fit_wall_s"]) + for arm in ("cpu", "gpu", "split") + } + pairs.append( + dict( + repeats=repeats, + seed=seed, + parity=flags, + parity_pass=parity, + feed_saving_pct=saved, + advances=bool(parity and saved["gpu"] >= 5 and saved["split"] > 0), + ) + ) + return dict( + runs=runs, + pairs=pairs, + advance={str(r): all(p["advances"] for p in pairs if p["repeats"] == r) for r in (1, 64)}, + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("raw", type=Path) + args = parser.parse_args() + print(json.dumps(compare(args.raw), indent=2, allow_nan=False)) diff --git a/experiments/nautilus_gpu_feed/probes.json b/experiments/nautilus_gpu_feed/probes.json new file mode 100644 index 0000000..edee8a6 --- /dev/null +++ b/experiments/nautilus_gpu_feed/probes.json @@ -0,0 +1,120 @@ +{ + "cpu": { + "device": "cpu", + "backend": "cpu", + "fp64": true, + "checks": [ + { + "repeats": 1, + "width": 50, + "max_abs_error": 4.656612873077393e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 1, + "width": 100, + "max_abs_error": 4.656612873077393e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 64, + "width": 50, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 64, + "width": 100, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + } + ] + }, + "cuda": { + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "backend": "gpu", + "fp64": true, + "checks": [ + { + "repeats": 1, + "width": 50, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 1, + "width": 100, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 64, + "width": 50, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + }, + { + "repeats": 64, + "width": 100, + "max_abs_error": 2.3283064365386963e-10, + "lengths": [ + 1, + 17, + 50, + 99, + 100, + 137 + ] + } + ] + } +} diff --git a/experiments/nautilus_gpu_feed/result.json b/experiments/nautilus_gpu_feed/result.json new file mode 100644 index 0000000..a02d98f --- /dev/null +++ b/experiments/nautilus_gpu_feed/result.json @@ -0,0 +1,1170 @@ +{ + "runs": [ + { + "arm": "gpu", + "seed": 1, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 70.11533556899849, + "cpu_s": 67.9290839, + "start_epoch": 1795607997.4449902, + "end_epoch": 1795608067.5603492, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 75, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.2511286469998595, + "warm_batch_median_s": 0.0040095045005728025, + "evaluation_wall_s": 0.5496130630035623, + "prepare_worker_s": 0.004968098011886468, + "wait_for_prepare_s": 0.0, + "collect_s": 0.20993441099926713, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 25.284949317005157, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.771040502477, + "mean": [ + 50.03393709838379, + 25.063416950471506, + 9.997894324901576 + ], + "std": [ + 0.03360593584893805, + 0.07121312635689482, + 0.03349392287587901 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 75.95420319000004, + "gpu_samples": 70, + "device_util_mean_pct": 0.05714285714285714, + "peak_device_memory_mib": 99, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "feed", + "seed": 1, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 59.862281241001256, + "cpu_s": 59.965159299999996, + "start_epoch": 1795608074.447518, + "end_epoch": 1795608134.3098297, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 150, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.2398969189998752, + "warm_batch_median_s": 0.006704296500174678, + "evaluation_wall_s": 0.7332285580050666, + "prepare_worker_s": 0.030992801001048065, + "wait_for_prepare_s": 0.0564965969970217, + "collect_s": 0.2856158660069923, + "parallel_membership_s": 0.39194475599651923, + "membership_jobs": 106, + "training_s": 24.674758312999984, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.771040502477, + "mean": [ + 50.03393709838379, + 25.063416950471506, + 9.997894324901576 + ], + "std": [ + 0.03360593584893805, + 0.07121312635689482, + 0.03349392287587901 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 65.12187737599925, + "gpu_samples": 60, + "device_util_mean_pct": 0.1, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "split", + "seed": 1, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 52.15581311300048, + "cpu_s": 52.170482, + "start_epoch": 1795608139.6942463, + "end_epoch": 1795608191.8500764, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 150, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.19364945599954808, + "warm_batch_median_s": 0.005503600999873015, + "evaluation_wall_s": 0.5915035800098849, + "prepare_worker_s": 0.01007170101365773, + "wait_for_prepare_s": 0.0, + "collect_s": 0.26345188700543076, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 21.851035205996595, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.771040502477, + "mean": [ + 50.03393709838379, + 25.063416950471506, + 9.997894324901576 + ], + "std": [ + 0.03360593584893805, + 0.07121312635689482, + 0.03349392287587901 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 57.25774043999991, + "gpu_samples": 52, + "device_util_mean_pct": 0.15384615384615385, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "cpu", + "seed": 1, + "repeats": 1, + "device": "cpu", + "fit_wall_s": 44.757903869000074, + "cpu_s": 44.7863895, + "start_epoch": 1795608196.9183757, + "end_epoch": 1795608241.6762965, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 75, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.09836447999987286, + "warm_batch_median_s": 0.00048165000043809414, + "evaluation_wall_s": 0.13475727700460993, + "prepare_worker_s": 0.0034368000051472336, + "wait_for_prepare_s": 0.0, + "collect_s": 0.013299897989782039, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 18.881206649994056, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.511496187520024, + "ess": 1300.7710405024757, + "mean": [ + 50.03393709838374, + 25.06341695047148, + 9.997894324901575 + ], + "std": [ + 0.03360593584893798, + 0.07121312635689493, + 0.033493922875879 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 48.3760876209999, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "cpu", + "seed": 1, + "repeats": 64, + "device": "cpu", + "fit_wall_s": 40.34556910399988, + "cpu_s": 40.5000596, + "start_epoch": 1795608244.6027122, + "end_epoch": 1795608284.9483025, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 75, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.11233915200136835, + "warm_batch_median_s": 0.0011075000002165325, + "evaluation_wall_s": 0.1985087980137905, + "prepare_worker_s": 0.0032038520021160366, + "wait_for_prepare_s": 0.0, + "collect_s": 0.06518537501506216, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 16.875911932002055, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.511496187520024, + "ess": 1300.7710405024757, + "mean": [ + 50.033937098383745, + 25.063416950471485, + 9.99789432490157 + ], + "std": [ + 0.033605935848938, + 0.07121312635689488, + 0.03349392287587898 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 43.28768343199954, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "split", + "seed": 1, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 44.15721454599952, + "cpu_s": 44.0819006, + "start_epoch": 1795608288.6753051, + "end_epoch": 1795608332.8325365, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 150, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.18032370999935665, + "warm_batch_median_s": 0.0077591825001945836, + "evaluation_wall_s": 0.6778095799927542, + "prepare_worker_s": 0.008413394993112888, + "wait_for_prepare_s": 0.0, + "collect_s": 0.3816841149910033, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 17.292123727005674, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.7710405024773, + "mean": [ + 50.03393709838378, + 25.063416950471492, + 9.997894324901576 + ], + "std": [ + 0.03360593584893804, + 0.07121312635689489, + 0.03349392287587902 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 48.01347664499917, + "gpu_samples": 44, + "device_util_mean_pct": 0.5454545454545454, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "feed", + "seed": 1, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 45.31926330600072, + "cpu_s": 45.371512200000005, + "start_epoch": 1795608338.3631706, + "end_epoch": 1795608383.6824489, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 150, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.1790588170006231, + "warm_batch_median_s": 0.008163453499946627, + "evaluation_wall_s": 0.7378495759967336, + "prepare_worker_s": 0.027178005993846455, + "wait_for_prepare_s": 0.039168403009171016, + "collect_s": 0.40064884700223047, + "parallel_membership_s": 0.31112247399869375, + "membership_jobs": 106, + "training_s": 17.726851676001388, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.7710405024773, + "mean": [ + 50.03393709838378, + 25.063416950471492, + 9.997894324901576 + ], + "std": [ + 0.03360593584893804, + 0.07121312635689489, + 0.03349392287587902 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 49.36179587400147, + "gpu_samples": 45, + "device_util_mean_pct": 0.5333333333333333, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "gpu", + "seed": 1, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 46.519652691000374, + "cpu_s": 46.406938100000005, + "start_epoch": 1795608389.1909404, + "end_epoch": 1795608435.71061, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7500, + "batches": 75, + "device_chunks": 75, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.2385899020009674, + "warm_batch_median_s": 0.006761645500773739, + "evaluation_wall_s": 0.7154130250073649, + "prepare_worker_s": 0.003639111004304141, + "wait_for_prepare_s": 0.0, + "collect_s": 0.4064930720051052, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 19.01962144400204, + "bounds": 26, + "proposal_sha256": "b325f600e883c531009116ca654a8459624f062283c9b6b9b015cb6154ea212b", + "logz": -57.51149618752003, + "ess": 1300.7710405024773, + "mean": [ + 50.03393709838378, + 25.063416950471492, + 9.997894324901576 + ], + "std": [ + 0.03360593584893804, + 0.07121312635689489, + 0.03349392287587902 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 50.418129265999596, + "gpu_samples": 46, + "device_util_mean_pct": 0.5217391304347826, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "cpu", + "seed": 2, + "repeats": 1, + "device": "cpu", + "fit_wall_s": 47.88176831599958, + "cpu_s": 47.934956, + "start_epoch": 1795608440.4897718, + "end_epoch": 1795608488.3715587, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 74, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.12630024800091633, + "warm_batch_median_s": 0.00047708099918963853, + "evaluation_wall_s": 0.16202774901103112, + "prepare_worker_s": 0.0033316230055788765, + "wait_for_prepare_s": 0.0, + "collect_s": 0.013299641013873043, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 19.52797426199868, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.47430798570669, + "ess": 1381.1601569447214, + "mean": [ + 50.033145542570026, + 25.071206804163666, + 9.99888633953453 + ], + "std": [ + 0.03374099153601408, + 0.07372776611547278, + 0.033709128343324665 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 50.97454659399955, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "split", + "seed": 2, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 47.49614932099939, + "cpu_s": 47.543245899999995, + "start_epoch": 1795608492.2670772, + "end_epoch": 1795608539.7632413, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 148, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.10976837500129477, + "warm_batch_median_s": 0.005087613999421592, + "evaluation_wall_s": 0.4703684300020541, + "prepare_worker_s": 0.008663242992042797, + "wait_for_prepare_s": 0.0, + "collect_s": 0.24490169599084766, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 18.801045253996563, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.1601569447198, + "mean": [ + 50.03314554257004, + 25.071206804163673, + 9.998886339534554 + ], + "std": [ + 0.033740991536014085, + 0.07372776611547281, + 0.033709128343324665 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 51.47016352100036, + "gpu_samples": 48, + "device_util_mean_pct": 0.041666666666666664, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "feed", + "seed": 2, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 59.07240615000046, + "cpu_s": 58.9957623, + "start_epoch": 1795608544.7047112, + "end_epoch": 1795608603.7771347, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 148, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.15827711600104521, + "warm_batch_median_s": 0.005506939000042621, + "evaluation_wall_s": 0.5914501950028352, + "prepare_worker_s": 0.028574734020367032, + "wait_for_prepare_s": 0.04773279899927729, + "collect_s": 0.24767332899682515, + "parallel_membership_s": 0.39251646299999265, + "membership_jobs": 112, + "training_s": 22.71088926399716, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.1601569447198, + "mean": [ + 50.03314554257004, + 25.071206804163673, + 9.998886339534554 + ], + "std": [ + 0.033740991536014085, + 0.07372776611547281, + 0.033709128343324665 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 62.888926855001046, + "gpu_samples": 59, + "device_util_mean_pct": 0.1016949152542373, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "gpu", + "seed": 2, + "repeats": 1, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 55.01150318300097, + "cpu_s": 51.9655063, + "start_epoch": 1795608610.3505328, + "end_epoch": 1795608665.3620532, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 74, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.20078769999963697, + "warm_batch_median_s": 0.00399107399971399, + "evaluation_wall_s": 0.49959018999106775, + "prepare_worker_s": 0.0036037950030731736, + "wait_for_prepare_s": 0.0, + "collect_s": 0.22057308300645673, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 23.671892094000214, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.1601569447198, + "mean": [ + 50.03314554257004, + 25.071206804163673, + 9.998886339534554 + ], + "std": [ + 0.033740991536014085, + 0.07372776611547281, + 0.033709128343324665 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 59.8319328639991, + "gpu_samples": 55, + "device_util_mean_pct": 0.03636363636363636, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.862645149230957e-09 + }, + { + "arm": "gpu", + "seed": 2, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 38.92697059099919, + "cpu_s": 38.740271, + "start_epoch": 1795608670.423809, + "end_epoch": 1795608709.3507938, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 74, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.17560781899919675, + "warm_batch_median_s": 0.0069985770005587256, + "evaluation_wall_s": 0.6268717419934546, + "prepare_worker_s": 0.002668200011612498, + "wait_for_prepare_s": 0.0, + "collect_s": 0.3944655639897974, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 15.645789934003915, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.16015694472, + "mean": [ + 50.03314554256999, + 25.07120680416366, + 9.998886339534556 + ], + "std": [ + 0.03374099153601409, + 0.0737277661154728, + 0.03370912834332465 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 42.40038020099928, + "gpu_samples": 39, + "device_util_mean_pct": 0.5897435897435898, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.3969838619232178e-09 + }, + { + "arm": "feed", + "seed": 2, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 43.2823934349999, + "cpu_s": 43.2866802, + "start_epoch": 1795608712.9425807, + "end_epoch": 1795608756.224988, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 148, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.15659244199923705, + "warm_batch_median_s": 0.008071266000115429, + "evaluation_wall_s": 0.6805437820039515, + "prepare_worker_s": 0.022830832000181545, + "wait_for_prepare_s": 0.03437111200582876, + "collect_s": 0.3867110999944998, + "parallel_membership_s": 0.27877547101161326, + "membership_jobs": 112, + "training_s": 16.51006749400949, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.16015694472, + "mean": [ + 50.03314554256999, + 25.07120680416366, + 9.998886339534556 + ], + "std": [ + 0.03374099153601409, + 0.0737277661154728, + 0.03370912834332465 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 46.84031285099991, + "gpu_samples": 44, + "device_util_mean_pct": 0.5227272727272727, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.3969838619232178e-09 + }, + { + "arm": "split", + "seed": 2, + "repeats": 64, + "device": "NVIDIA GeForce RTX 2060 with Max-Q Design", + "fit_wall_s": 55.69797363900034, + "cpu_s": 55.52109780000001, + "start_epoch": 1795608760.740526, + "end_epoch": 1795608816.4385154, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 148, + "width": 50, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.25403830299910624, + "warm_batch_median_s": 0.007956585001011263, + "evaluation_wall_s": 0.7692811470078595, + "prepare_worker_s": 0.009907070987537736, + "wait_for_prepare_s": 0.0, + "collect_s": 0.38788618800390395, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 21.649647100997754, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.474307985706695, + "ess": 1381.16015694472, + "mean": [ + 50.03314554256999, + 25.07120680416366, + 9.998886339534556 + ], + "std": [ + 0.03374099153601409, + 0.0737277661154728, + 0.03370912834332465 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 59.86127013499936, + "gpu_samples": 56, + "device_util_mean_pct": 0.42857142857142855, + "peak_device_memory_mib": 91, + "max_abs_numpy_error": 1.3969838619232178e-09 + }, + { + "arm": "cpu", + "seed": 2, + "repeats": 64, + "device": "cpu", + "fit_wall_s": 48.572754504999466, + "cpu_s": 48.3915309, + "start_epoch": 1795608821.2512777, + "end_epoch": 1795608869.824056, + "native": { + "n_live": 200, + "n_update": 200, + "n_batch": 100, + "n_networks": 4 + }, + "calls": 7400, + "batches": 74, + "device_chunks": 74, + "width": 100, + "padding": 0, + "objective_cache_sizes": [ + 1 + ], + "first_batch_s": 0.17697006900016277, + "warm_batch_median_s": 0.001352086001134012, + "evaluation_wall_s": 0.29449638199730543, + "prepare_worker_s": 0.003327491995150922, + "wait_for_prepare_s": 0.0, + "collect_s": 0.094353135997153, + "parallel_membership_s": 0.0, + "membership_jobs": 0, + "training_s": 19.275349335997817, + "bounds": 28, + "proposal_sha256": "fdd497a8a68ff665935a9473301908f9e36842323f342d3107c774b6797b83d9", + "logz": -57.47430798570669, + "ess": 1381.1601569447214, + "mean": [ + 50.03314554257007, + 25.07120680416366, + 9.998886339534524 + ], + "std": [ + 0.03374099153601403, + 0.07372776611547277, + 0.03370912834332464 + ], + "names": [ + "centre", + "normalization", + "sigma" + ], + "affinity": [ + 0, + 2, + 4, + 6 + ], + "jax": "0.12.0.1", + "fresh_process_s": 52.05276893100017, + "max_abs_numpy_error": 2.7939677238464355e-09 + } + ], + "pairs": [ + { + "repeats": 1, + "seed": 1, + "parity": { + "cpu": { + "trajectory_equal": true, + "logz_delta": 7.105427357601002e-15, + "max_mean_shift_sd": 1.4800358998119894e-12, + "ess_relative_delta": -9.992007221626409e-16 + }, + "gpu": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "split": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "feed": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + } + }, + "parity_pass": true, + "feed_saving_pct": { + "cpu": -33.74683813658814, + "gpu": 14.62312665951302, + "split": -14.77585654988063 + }, + "advances": false + }, + { + "repeats": 1, + "seed": 2, + "parity": { + "cpu": { + "trajectory_equal": true, + "logz_delta": 7.105427357601002e-15, + "max_mean_shift_sd": 6.850559491484518e-13, + "ess_relative_delta": 1.1102230246251565e-15 + }, + "gpu": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "split": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "feed": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + } + }, + "parity_pass": true, + "feed_saving_pct": { + "cpu": -23.37139631132119, + "gpu": -7.381916021255619, + "split": -24.37304285609292 + }, + "advances": false + }, + { + "repeats": 64, + "seed": 1, + "parity": { + "cpu": { + "trajectory_equal": true, + "logz_delta": 7.105427357601002e-15, + "max_mean_shift_sd": 1.057168499865707e-12, + "ess_relative_delta": -1.2212453270876722e-15 + }, + "gpu": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "split": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "feed": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + } + }, + "parity_pass": true, + "feed_saving_pct": { + "cpu": -12.327733410278618, + "gpu": 2.5803919753508375, + "split": -2.6316169893159103 + }, + "advances": false + }, + { + "repeats": 64, + "seed": 2, + "parity": { + "cpu": { + "trajectory_equal": true, + "logz_delta": 7.105427357601002e-15, + "max_mean_shift_sd": 2.316461294570605e-12, + "ess_relative_delta": 8.881784197001252e-16 + }, + "gpu": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "split": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + }, + "feed": { + "trajectory_equal": true, + "logz_delta": 0.0, + "max_mean_shift_sd": 0.0, + "ess_relative_delta": 0.0 + } + }, + "parity_pass": true, + "feed_saving_pct": { + "cpu": 10.891622523600219, + "gpu": -11.18870227473543, + "split": 22.29090107383531 + }, + "advances": false + } + ], + "advance": { + "1": false, + "64": false + } +}