resolve¶
- jaxrens.cli.resolve.resolve(root)[source]¶
Translate a validated
RootSpecinto one unifiedResolvedConfig.Topology resolution decides the batcher:
n_total == 1(scalar pressure, no inter-RE replica-axis list) →SingleRun(). Init arrays carry shape(K, ...).n_total >= 2→PmapVmapRuns(n_gpu, n_per_gpu)withn_gpu = max(1, len(jax.local_devices()))clamped ton_total. Init arrays carry shape(n_total, K, ...); the dispatcher reshapes to(n_gpu, n_per_gpu, K, ...)at consume time.
Future case “single NS sharded across multiple GPUs” will be a third branch keyed on a new batcher type — orthogonal to this dispatcher.
- Parameters:
root (RootSpec) – Fully validated pydantic config.
- Returns:
Single
ResolvedConfigcarrying the resolved batcher.- Raises:
ValueError – Replica-axis list lengths disagree,
n_totalis not divisible by the detected device count, or apressure-flavor inter-RE has a scalarensemble.pressure.- Return type: