Skip to content

Commit 9ebe5bd

Browse files
javieratomicclaude
andcommitted
Make the compiler memory headroom a preparation setting
Forward compilation and kernel tuning size their worker pools against host memory and always leave a fixed 8 GiB free. On a unified-memory GPU such as DGX Spark (GB10), the model's weights already occupy most of that memory: a DeepSeek V4.1 Flash TP3 rank has about 13 GiB left after loading, and with the fixed floor the sizing rule (4 GiB per compiler, 512 MiB per Inductor thread) allows one forward compiler with two Inductor threads per rank, so "Compile model forwards" runs mostly serially. The right floor depends on the host and the model, so it should be a setting rather than a constant. Lowering it keeps the existing safety rule: on unified-memory GPUs, sizing still leaves the greater of this floor and the preparation headroom that protects KV capacity and later processes. Before this change the floor was the private constant `_HEADROOM_BYTES` in `ignition/preparation/host_memory.py`. It is now `COMPILE_HEADROOM_BYTES` (still 8 GiB) used as the default of a `compile_headroom_bytes` argument in `worker_limit`, `compile_threads`, `tuning_limits`, `candidate_scratch_limit` and `CompilePool`. The value comes from the new `[preparation] compile_headroom` setting (a size string such as "6G", default "8G") or the advanced `--compile-headroom SIZE` flag of `export`, `debug-serve` and `bench`, which overrides the file. It is carried as `Plan.compile_headroom_bytes`, passed through every recipe's `PreparationConfig` to the tuning session, `ForwardCache` and `CompilePool`, and sent from rank zero to multi-host peers, as `compile_workers` is. The plan dictionary, the "Select GPUs." line, the tuning report and the bench result record it. Negative, empty and unparsable values are usage errors. The low-memory threshold in `release_unused` keeps 8 GiB. When a pool has no room for one worker, its MemoryError now also reports the headroom and per-worker bytes. docs/cli-design.md and docs/model-preparation.md document the setting and flag. With the default, pool sizing is unchanged. Measured result: with a cold forward cache and restored tuning on three DGX Spark GB10 hosts (DeepSeek V4.1 Flash TP3), "Compile model forwards" took 507.7 s with `--compile-headroom 6G` and 511.2 s with `[preparation] compile_headroom = "6G"`, against 905.7 s with the default. By the sizing rule, at 13 GiB available a 6 GiB floor gives each rank one compiler with six Inductor threads instead of two; the export logs do not record the thread count. This is a component result for one model and host type, measured once per setting with this change applied to main at `ca1f960e`, 184 commits before `d2b5c5f3`; those commits change how `ForwardCache` releases memory, so the timing may differ on `d2b5c5f3`. Kernel tuning was restored from cache, so tuning pools and candidate scratch sized with a lower headroom were not exercised on hardware. A host with less memory left after loading can exhaust host memory with a low value. Evidence: the plans of those three exports recorded 8 GiB, 6 GiB and 6 GiB. With 6 GiB the lowest MemAvailable on any host during the phase was 9 GiB, with no OOM. The 6 GiB package served with decode speed and 262k-token prefill time in line with two earlier exports of the same checkpoint and recipe with the default headroom, and answered a 262k-token prompt that asks for 16 values placed through the context with all 16 correct. On `d2b5c5f3` plus this commit, the CPU suites tests/cli, tests/preparation, tests/recipes/test_declarations.py, tests/recipes/test_minimax_m3.py and tests/recipes/muse_spark (CUDA hidden, environment from uv.lock) gave 2063 passed, 65 failed and 222 skipped; `d2b5c5f3` alone fails the same 65 tests in the same environment (2016 passed, 222 skipped). Those failures come from a locally built extension without `validate_prepared_contract`, chat-template fixtures that were not prepared, a missing Kimi K3 checkpoint, and CLI and multi-host routing expectations that also fail on `d2b5c5f3`. New tests cover setting and flag parsing and validation, the plan and startup line, every recipe's `PreparationConfig` (Kimi K3.1 Pro reuses the Kimi K3 adapter), `worker_limit`, `compile_threads`, `tuning_limits`, `candidate_scratch_limit`, `CompilePool` sizing and the tuning report. The export measurement was not repeated on `d2b5c5f3`, and no GPU tests were run on it. Design-Signed-Off-By: Claude Opus 5.5; design-review=3ad6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Javier López <59578422+javieratomic@users.noreply.github.com>
1 parent d2b5c5f commit 9ebe5bd

47 files changed

Lines changed: 398 additions & 63 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/cli-design.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ explicit flags take precedence.
419419
| `--collective-tuning static\|runtime` | Static autotunes collectives during preparation; runtime uses the required ladder file for final compiled geometry and captures runtime submode/active-CTA selection for eligible BF16 PCIe reductions. Overrides `[preparation] collective_tuning`, then the recipe declaration. | Static |
420420
| `--lock-gpu-clocks` | Lock each tuning GPU at its maximum supported graphics frequency during b12x and Inductor autotuning, then reset driver clock defaults. Frozen warmup, capture, and serving remain unlocked. Requires root or noninteractive sudo access to `nvidia-smi`. Command line only; inactive with `--autotune-effort off`. | off |
421421
| `--compile-workers N` | CPU compiler process budget per host, divided among local preparation ranks and bounded by available RAM and device memory. Applies to b12x kernel compilation and complete-forward compilation. Overrides `[preparation] compile_workers`. | Automatic |
422+
| `--compile-headroom SIZE` | System memory that compiler processes and kernel-tuning races leave free on each host, such as `6G`; binary size suffixes as in `[memory] reserve`. On unified-memory GPUs, a larger preparation headroom from the plan and `[memory] reserve` still applies. Lowering it permits more compiler processes and Inductor threads on unified-memory GPUs such as DGX Spark, at the risk of exhausting host memory. Recorded in the plan, the tuning report and the `bench` result. Overrides `[preparation] compile_headroom`. | `8G` |
422423
| `--tuning-gpus LIST` | Local kernel-tuning GPUs. Start with the serving GPU list, then append complete replicas of that TP group on matching hardware. Serving TP size stays fixed. Command line only; cannot be combined with multi-host `--ranks`. | Serving GPUs |
423424
| `--no-compile` | Development only: capture graphs without compiling forwards. A recipe never sets it. | off |
424425
| `--force-moe-decode-a16` / `--no-force-moe-decode-a16` | Prepare Qwen3.8 Flash NVFP4 target routed experts as one packed weight owner: decode and speculative verification use W4A16 at every token-row count, and separate prefill graphs use calibrated A4. Requires SM120/121, checkpoint activation scales, and rank-local expert intermediate width divisible by 64 (TP1/2). Mixed prefill and other recipes/precisions reject the flag. Shared experts and stored A16 MTP experts retain their precision. Overrides `[preparation] force_moe_decode_a16`; the resolved value is recorded in the plan and package rebuild metadata. | off |
@@ -1192,6 +1193,7 @@ max_concurrency = 4
11921193
[preparation]
11931194
# force_moe_decode_a16 = false # Qwen Flash NVFP4: A16 decode/verify, calibrated A4 prefill.
11941195
# compile_workers = 24 # Optional CPU process budget per host.
1196+
# compile_headroom = "8G" # System memory compiler and tuning pools leave free per host.
11951197
# autotune_effort = "default" # off, default, audit.
11961198
# collective_tuning = "static" # static, runtime; omitted uses the recipe default.
11971199

@@ -1280,6 +1282,7 @@ Configuration assigns each decision to one owner:
12801282
| Queue, frontend workers, event capacity, body limit | Concurrency and recipe image limits |
12811283
| Compiler workers | Automatic memory-bounded sizing; `[preparation] compile_workers` or `--compile-workers` overrides |
12821284
| Collective selection | `--collective-tuning`, then `[preparation] collective_tuning`, otherwise the recipe default (`static`) |
1285+
| Compiler memory headroom | 8 GiB of system memory per host; `[preparation] compile_headroom` or `--compile-headroom` overrides |
12831286
| Kernel search effort | `--autotune-effort`, then `[preparation] autotune_effort`, otherwise `default` |
12841287
| Local tuning replicas | `--tuning-gpus`; independent of serving TP size |
12851288
| CUDA toolkit | `[paths] cuda`, otherwise native build libraries discover the system toolkit |

‎docs/model-preparation.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ device memory can reduce it; local preparation ranks share the budget. Set
245245
overrides that setting. Omitting both retains automatic sizing, including
246246
shared-memory limits on DGX Spark.
247247

248+
Automatic sizing leaves 8 GiB of system memory free beside compiler processes
249+
and tuning races. On unified-memory GPUs, the plan's preparation headroom
250+
applies instead when it is larger. On DGX Spark, the memory left after loading
251+
weights bounds both the compiler count and each compiler's Inductor threads.
252+
`--compile-headroom SIZE`, or `[preparation] compile_headroom = "SIZE"`,
253+
selects another value, such as `6G`; the flag overrides the setting. A smaller
254+
headroom compiles faster when memory is tight but leaves less for the rest of
255+
the host. The plan and tuning report record the value.
256+
248257
On integrated GPUs, kernel tuning is divided into memory-bounded jobs. The
249258
terminal dashboard shows the active job number and total job count, with a
250259
separate live display for each job. Redirecting output records plain kernel

‎ignition/cli/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ def _preparation_arguments(running, *, model_default="defaults.model"):
232232
advanced.add_argument("--compile-workers", type=int, metavar="N",
233233
help="CPU compiler process budget per host, shared by local preparation ranks;"
234234
" bounded by available RAM and device memory (default: automatic)")
235+
advanced.add_argument("--compile-headroom", metavar="SIZE",
236+
help="system memory compiler and tuning pools leave free on each host, such as 6G;"
237+
" a larger preparation headroom still applies (default: 8G)")
235238
advanced.add_argument("--tuning-gpus", metavar="LIST",
236239
help="local GPUs for kernel tuning, starting with --gpus and followed by complete"
237240
" TP replicas; serving TP size is unchanged (default: serving GPUs)")

‎ignition/cli/bench.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def run(args):
149149
plan = derive(configuration, model, Host.discover(), gpus=args.gpus, concurrency=concurrency,
150150
speculation=speculation(args, model, configuration), prefill_chunk=args.prefill_chunk_size,
151151
context_parallel=context_parallel(args, model), stream_overlap=stream_overlap(args, model),
152-
compile_workers=args.compile_workers, tuning_gpus=args.tuning_gpus,
152+
compile_workers=args.compile_workers, compile_headroom=args.compile_headroom, tuning_gpus=args.tuning_gpus,
153153
autotune_effort=args.autotune_effort, collective_tuning=args.collective_tuning, collective_ladder=args.collective_ladder,
154154
lock_gpu_clocks=args.lock_gpu_clocks, native_dense_activations=args.native_dense_activations,
155155
force_moe_decode_a16=args.force_moe_decode_a16,
@@ -225,6 +225,7 @@ def _measure(model, plan, configuration, settings, progress, *, compile_forwards
225225
"preparation": {key: preparation[key] for key in (
226226
"tensor_parallel", "prefill_chunk", "stream_overlap", "context_parallel",
227227
"native_dense_activations", "force_moe_decode_a16", "autotune_effort", "collective_tuning", "collective_ladder", "compile_workers",
228+
"compile_headroom_bytes",
228229
"speculative_token_capacity", "speculation", "expert_scale_compression", "mla_compute_mode",
229230
"online_mxfp8", "online_mxfp8_scope", "language_model_only")}}
230231

‎ignition/cli/config.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"defaults": {"model": str, "max_concurrency": int, "image_concurrency": int,
2424
"speculative_token_capacity": int, "speculative_graph_budget": int, "speculative_method": str},
2525
"memory": {"reserve": str},
26-
"preparation": {"compile_workers": int, "autotune_effort": str, "collective_tuning": str, "checkpoint_token_file": str, "force_moe_decode_a16": bool},
26+
"preparation": {"compile_workers": int, "compile_headroom": str, "autotune_effort": str, "collective_tuning": str, "checkpoint_token_file": str, "force_moe_decode_a16": bool},
2727
"prefix_cache": {"memory": str, "disk_limit": str, "drain_on_shutdown": str, "max_age": str},
2828
"paths": {"hub_cache": str, "kernel_cache": str, "package_cache": str, "export_staging": str,
2929
"prefix_cache": str, "cuda": str},
@@ -37,6 +37,7 @@
3737
"memory.reserve": "0",
3838
"preparation.force_moe_decode_a16": False,
3939
"preparation.compile_workers": 0,
40+
"preparation.compile_headroom": "8G",
4041
"preparation.autotune_effort": "default",
4142
"preparation.collective_tuning": None,
4243
"preparation.checkpoint_token_file": "~/.config/flare/agent.token",
@@ -92,6 +93,7 @@ def load(cls, path: Path | None = None) -> "Configuration":
9293
raise UsageError(f"{resolved}: unknown section [{section}]")
9394
configuration = cls(resolved, values, True)
9495
parse_size(configuration.get("memory.reserve").value)
96+
parse_size(configuration.get("preparation.compile_headroom").value, "compile_headroom in [preparation]")
9597
for key in ("prefix_cache.memory", "prefix_cache.disk_limit"):
9698
if configuration.get(key).value:
9799
parse_size(configuration.get(key).value, key.replace(".", " "))
@@ -182,6 +184,8 @@ def write_initial(self, model: str, max_concurrency: int) -> None:
182184
'# speculative_graph_budget = 64 # packed round graphs; excludes width-one and ordinary graphs',
183185
"", "[preparation]",
184186
'# compile_workers = 24 # CPU processes per host; default: automatic, bounded by memory',
187+
f'# compile_headroom = "{self.get("preparation.compile_headroom").value}"'
188+
' # system memory compiler and tuning pools leave free per host',
185189
'# force_moe_decode_a16 = false # Qwen Flash NVFP4 decode/verify A16, calibrated A4 prefill',
186190
'# autotune_effort = "default" # off, default, audit',
187191
'# collective_tuning = "static" # static, runtime; omitted uses recipe default',

‎ignition/cli/preparation.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ignition.recipes import ResolvedModel, resolve
1313
from ignition.recipes.declaration import Speculation
1414

15-
from .config import AUTOTUNE_EFFORTS, Configuration, Setting
15+
from .config import AUTOTUNE_EFFORTS, Configuration, Setting, parse_size
1616

1717

1818
@dataclass(frozen=True)
@@ -48,6 +48,7 @@ def derive(configuration: Configuration, model: ResolvedModel, host: Host, *, gp
4848
mixed_prefill: bool = False, prompt_logprobs: bool = False, expert_scale_compression: str | None = None,
4949
online_mxfp8: bool = False, online_mxfp8_scope: str | None = None, language_model_only: bool = False,
5050
compile_workers: int | None = None, tuning_gpus: str | None = None, autotune_effort: str | None = None, collective_tuning: str | None = None, collective_ladder=None,
51+
compile_headroom: str | None = None,
5152
image_concurrency: int | None = None, mla_compute_mode: str | None = None,
5253
lock_gpu_clocks: bool = False, native_dense_activations: bool = False,
5354
joint_tuning: bool = False, shard_hyperconnections: bool = False,
@@ -66,6 +67,7 @@ def derive(configuration: Configuration, model: ResolvedModel, host: Host, *, gp
6667
image_concurrency=image_capacity_setting(configuration, model, image_concurrency),
6768
online_mxfp8=online_mxfp8, online_mxfp8_scope=online_mxfp8_scope, language_model_only=language_model_only, mla_compute_mode=mla_compute_mode)
6869
result = replace(result, compile_workers=workers, hub_cache=configuration.directory("hub_cache"),
70+
compile_headroom_bytes=compiler_headroom(configuration, compile_headroom),
6971
autotune_effort=tuning_effort(configuration, autotune_effort),
7072
collective_tuning=mode, collective_ladder=ladder,
7173
force_moe_decode_a16=configuration.get("preparation.force_moe_decode_a16", force_moe_decode_a16).value,
@@ -102,6 +104,13 @@ def compiler_workers(configuration, flag=None):
102104
return value or None
103105

104106

107+
def compiler_headroom(configuration, flag=None):
108+
"""Resolve the system memory compiler pools and tuning races leave free, in bytes."""
109+
setting = configuration.get("preparation.compile_headroom", flag)
110+
return parse_size(setting.value, "--compile-headroom" if setting.source == "flag"
111+
else "compile_headroom in [preparation]")
112+
113+
105114
def tuning_devices(plan, host, flag):
106115
if plan.compile_workers is not None and plan.compile_workers < plan.world_size:
107116
raise UsageError("--compile-workers must provide at least one process per local serving rank")

‎ignition/cli/serve.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from . import display, environment
1919

20-
from .preparation import (Host, collective_tuning_mode, compiler_workers, context_parallel, derive, fetch, image_capacity_setting, resolve_model, speculation,
20+
from .preparation import (Host, collective_tuning_mode, compiler_headroom, compiler_workers, context_parallel, derive, fetch, image_capacity_setting, resolve_model, speculation,
2121
stream_overlap, tuning_devices, tuning_effort)
2222
from .config import Configuration
2323

@@ -202,6 +202,7 @@ def _export_hosts(args):
202202
mla_compute_mode=args.mla_compute_mode)
203203
collective_mode = collective_tuning_mode(configuration, model, args.collective_tuning)
204204
plan = replace(plan, compile_workers=compiler_workers(configuration, args.compile_workers), hub_cache=hub_cache,
205+
compile_headroom_bytes=compiler_headroom(configuration, args.compile_headroom),
205206
autotune_effort=tuning_effort(configuration, args.autotune_effort),
206207
collective_tuning=collective_mode,
207208
collective_ladder=resolve_collective_ladder(collective_mode, args.collective_ladder),
@@ -270,7 +271,7 @@ def __call__(self, message):
270271
args.max_concurrency)
271272
host = Host.discover()
272273
plan = derive(configuration, model, host, gpus=args.gpus, concurrency=concurrency,
273-
compile_workers=args.compile_workers, tuning_gpus=args.tuning_gpus, autotune_effort=args.autotune_effort,
274+
compile_workers=args.compile_workers, compile_headroom=args.compile_headroom, tuning_gpus=args.tuning_gpus, autotune_effort=args.autotune_effort,
274275
collective_tuning=args.collective_tuning, collective_ladder=args.collective_ladder,
275276
lock_gpu_clocks=args.lock_gpu_clocks, native_dense_activations=args.native_dense_activations,
276277
force_moe_decode_a16=configuration.get("preparation.force_moe_decode_a16", args.force_moe_decode_a16).value,
@@ -304,6 +305,7 @@ def __call__(self, message):
304305
f"{(' · online MXFP8 ' + plan.online_mxfp8_scope) if plan.online_mxfp8 else ''}"
305306
f"{' · language model only' if plan.language_model_only else ''}"
306307
f" · compile workers {plan.compile_workers or 'auto'} per host{tuning}"
308+
f" · compile headroom {plan.compile_headroom_bytes / (1 << 30):g} GiB"
307309
f" · autotune effort {plan.autotune_effort} · collective tuning {plan.collective_tuning}{ladder_name}"
308310
f"{' · native dense activations' if plan.native_dense_activations else ''}"
309311
f"{' · MoE decode A16 / prefill A4' if plan.force_moe_decode_a16 else ''}"
@@ -464,6 +466,7 @@ def debug_serve(args) -> int:
464466
language_model_only=args.language_model_only, mla_compute_mode=args.mla_compute_mode)
465467
collective_mode = collective_tuning_mode(configuration, model, args.collective_tuning)
466468
plan = replace(plan, compile_workers=compiler_workers(configuration, args.compile_workers), hub_cache=hub_cache,
469+
compile_headroom_bytes=compiler_headroom(configuration, args.compile_headroom),
467470
autotune_effort=tuning_effort(configuration, args.autotune_effort),
468471
collective_tuning=collective_mode,
469472
collective_ladder=resolve_collective_ladder(collective_mode, args.collective_ladder),

‎ignition/planning.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from pathlib import Path
1616

1717
from ignition.errors import CapacityError, UsageError
18+
from ignition.preparation.host_memory import COMPILE_HEADROOM_BYTES
1819
from ignition.preparation.tuning_replicas import TuningReplica
1920
from ignition.preparation.selection import BenchmarkSelection
2021
from ignition.recipes.declaration import Checkpoint, Recipe, Speculation
@@ -185,6 +186,8 @@ class Plan:
185186
roce_ring: bool = False
186187
roce_chain: bool = False
187188
compile_workers: int | None = None
189+
# System memory compiler pools and tuning races leave free on each host.
190+
compile_headroom_bytes: int = COMPILE_HEADROOM_BYTES
188191
autotune_effort: str = "default"
189192
collective_ladder: dict | None = None
190193
collective_tuning: str | None = None
@@ -369,6 +372,7 @@ def to_dict(self) -> dict:
369372
"expert_scale_compression": self.expert_scale_compression,
370373
"mla_compute_mode": self.mla_compute_mode,
371374
"compile_workers": self.compile_workers,
375+
"compile_headroom_bytes": self.compile_headroom_bytes,
372376
"autotune_effort": self.autotune_effort,
373377
"collective_tuning": self.collective_tuning,
374378
"collective_ladder": self.collective_ladder,

‎ignition/preparation/aot.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .compilation import (DEFAULT_CACHE_ROOT, _INVOCATIONS, _OPTIONS, _Invocation, _artifact_kernel_table,
3535
_byte_storage, _storage_region, _lower_storage, _compiler_recursion)
3636
from .device_binding import bind_device, relocate_inductor, restore_device, restore_prepared_device
37-
from .host_memory import release_unused
37+
from .host_memory import COMPILE_HEADROOM_BYTES, release_unused
3838

3939
_GUARD_LOCK = RLock()
4040
_GUARD_TENSOR_MODE = ContextVar("flare_guard_tensor_mode", default=None)
@@ -566,7 +566,7 @@ class ForwardCache:
566566
"""Load complete compiled forwards before tracing the serving catalog."""
567567

568568
def __init__(self, *, namespace, device, root=None, headroom_bytes=0, options=None, compile_workers=None,
569-
lock_gpu_clocks=False):
569+
lock_gpu_clocks=False, compile_headroom_bytes=COMPILE_HEADROOM_BYTES):
570570
runtime_patches.apply()
571571
import flashinfer
572572
from torch._inductor.codecache import torch_key
@@ -575,6 +575,7 @@ def __init__(self, *, namespace, device, root=None, headroom_bytes=0, options=No
575575
self.headroom_bytes = headroom_bytes
576576
self.compile_workers = compile_workers
577577
self.lock_gpu_clocks = lock_gpu_clocks
578+
self.compile_headroom_bytes = compile_headroom_bytes
578579
self.options = MappingProxyType(dict(_OPTIONS if options is None else options))
579580
properties = torch.cuda.get_device_properties(device)
580581
options = {name: value for name, value in self.options.items() if name != 'compile_threads'}
@@ -710,7 +711,8 @@ def _prepare_many(self, functions, signatures, *, progress, coordinator, materia
710711
selections = InductorSelections(self.device, lock_gpu_clocks=self.lock_gpu_clocks)
711712
compiled, paths, pending = {}, {}, []
712713
with phase(progress, "Compile model forwards", total=len(functions)) as stage, CompilePool(self.device,
713-
headroom_bytes=self.headroom_bytes, options=self.options, compile_workers=self.compile_workers) as compiler:
714+
headroom_bytes=self.headroom_bytes, options=self.options, compile_workers=self.compile_workers,
715+
compile_headroom_bytes=self.compile_headroom_bytes) as compiler:
714716
def finish():
715717
name, bound, path = _completed(pending)
716718
try:
@@ -799,7 +801,8 @@ def _prepare_ranks(self, functions, signatures, coordinator, *, progress, materi
799801
try:
800802
compiler = compiler_scope.enter_context(CompilePool(
801803
self.device, headroom_bytes=self.headroom_bytes, pools=coordinator.local_ranks,
802-
options=self.options, compile_workers=self.compile_workers))
804+
options=self.options, compile_workers=self.compile_workers,
805+
compile_headroom_bytes=self.compile_headroom_bytes))
803806
except MemoryError as failure:
804807
# A rank whose GPU has no room for a compiler lends its forwards to the others on this host.
805808
unavailable = f"{type(failure).__name__}: {failure}"

0 commit comments

Comments
 (0)