Skip to content

Add HELION_AUTOTUNE_PRECOMPILE_REPS setting to run kernel multiple times during spawn precompile#1914

Open
yf225 wants to merge 1 commit intopytorch:mainfrom
yf225:export-D99175421
Open

Add HELION_AUTOTUNE_PRECOMPILE_REPS setting to run kernel multiple times during spawn precompile#1914
yf225 wants to merge 1 commit intopytorch:mainfrom
yf225:export-D99175421

Conversation

@yf225
Copy link
Copy Markdown
Contributor

@yf225 yf225 commented Apr 1, 2026

Summary:
When using spawn precompile mode, a kernel may compile and run once
successfully but cause an illegal memory access (IMA) after repeated
execution during benchmarking. Since benchmarking runs in the main
process, this corrupts the GPU state and crashes the entire autotuning
session.

This adds a autotune_precompile_reps setting (env var
HELION_AUTOTUNE_PRECOMPILE_REPS, default 1) that controls how many
times the kernel is executed in the spawn subprocess during precompile.
Setting it to e.g. 10 helps catch IMAs that only manifest after
repeated runs, while keeping the failure isolated in the subprocess.

Differential Revision: D99175421

…mes during spawn precompile

Summary:
When using spawn precompile mode, a kernel may compile and run once
successfully but cause an illegal memory access (IMA) after repeated
execution during benchmarking. Since benchmarking runs in the main
process, this corrupts the GPU state and crashes the entire autotuning
session.

This adds a `autotune_precompile_reps` setting (env var
`HELION_AUTOTUNE_PRECOMPILE_REPS`, default 1) that controls how many
times the kernel is executed in the spawn subprocess during precompile.
Setting it to e.g. 10 helps catch IMAs that only manifest after
repeated runs, while keeping the failure isolated in the subprocess.

Differential Revision: D99175421
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 1, 2026

@yf225 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99175421.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant