Skip to content

Commit 454932d

Browse files
authored
Make fork default precompilation strategy (#979)
1 parent 37c3e3f commit 454932d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/api/settings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ def my_kernel(x: torch.Tensor) -> torch.Tensor:
118118
.. autoattribute:: Settings.autotune_precompile
119119
120120
Select the autotuner precompile mode, which adds parallelism and
121-
checks for errors/timeouts. ``"spawn"`` (default) runs kernel
122-
warm-up in a fresh process including running to check for errors,
123-
``"fork"`` is faster but does not include the error check run,
124-
or None to disables precompile checks altogether. Controlled by
121+
checks for errors/timeouts. ``"fork"`` (default) is faster but does
122+
not include the error check run, ``"spawn"`` runs kernel warm-up in a
123+
fresh process including running to check for errors, or None to
124+
disables precompile checks altogether. Controlled by
125125
``HELION_AUTOTUNE_PRECOMPILE``.
126126
127127
.. autoattribute:: Settings.autotune_random_seed
@@ -240,7 +240,7 @@ Built-in values for ``HELION_AUTOTUNER`` include ``"PatternSearch"``, ``"Differe
240240
| ``HELION_DISALLOW_AUTOTUNING`` | ``check_autotuning_disabled`` | Hard-disable autotuning; kernels must supply explicit configs when this is ``1``. |
241241
| ``HELION_AUTOTUNE_COMPILE_TIMEOUT`` | ``autotune_compile_timeout`` | Maximum seconds to wait for Triton compilation during autotuning. |
242242
| ``HELION_AUTOTUNE_LOG_LEVEL`` | ``autotune_log_level`` | Adjust logging verbosity; accepts names like ``INFO`` or numeric levels. |
243-
| ``HELION_AUTOTUNE_PRECOMPILE`` | ``autotune_precompile`` | Select the autotuner precompile mode (``"spawn"``, ``"fork"``, or disable when empty). |
243+
| ``HELION_AUTOTUNE_PRECOMPILE`` | ``autotune_precompile`` | Select the autotuner precompile mode (``"fork"`` (default), ``"spawn"``, or disable when empty). |
244244
| ``HELION_AUTOTUNE_PRECOMPILE_JOBS`` | ``autotune_precompile_jobs`` | Cap the number of concurrent Triton precompile subprocesses. |
245245
| ``HELION_AUTOTUNE_RANDOM_SEED`` | ``autotune_random_seed`` | Seed used for randomized autotuning searches. |
246246
| ``HELION_AUTOTUNE_MAX_GENERATIONS`` | ``autotune_max_generations`` | Upper bound on generations for Pattern Search and Differential Evolution. |

helion/runtime/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class _Settings:
264264
default_factory=functools.partial(
265265
_env_get_literal,
266266
"HELION_AUTOTUNE_PRECOMPILE",
267-
cast("PrecompileMode", "spawn"),
267+
cast("PrecompileMode", "fork"),
268268
mapping={
269269
"spawn": "spawn",
270270
"fork": "fork",
@@ -367,7 +367,7 @@ class Settings(_Settings):
367367
"Use HELION_AUTOTUNE_LOG_LEVEL to override or set 0 to disable output."
368368
),
369369
"autotune_compile_timeout": "Timeout for Triton compilation in seconds used for autotuning. Default is 60 seconds.",
370-
"autotune_precompile": "Autotuner precompile mode: 'spawn', 'fork', or falsy/None to disable. Defaults to 'spawn' on non-Windows platforms.",
370+
"autotune_precompile": "Autotuner precompile mode: 'fork', 'spawn', or falsy/None to disable. Defaults to 'fork' on non-Windows platforms.",
371371
"autotune_precompile_jobs": "Maximum concurrent Triton precompile processes, default to cpu count.",
372372
"autotune_random_seed": "Seed used for autotuner random number generation. Defaults to HELION_AUTOTUNE_RANDOM_SEED or a time-based seed.",
373373
"autotune_accuracy_check": "If True, validate candidate configs against the baseline kernel output before accepting them during autotuning.",

0 commit comments

Comments
 (0)