Skip to content

[Autotuner] Add crash recovery bash script for unrecoverable CUDA errors#1922

Closed
yf225 wants to merge 1 commit intoyf225/stack/90from
yf225/stack/92
Closed

[Autotuner] Add crash recovery bash script for unrecoverable CUDA errors#1922
yf225 wants to merge 1 commit intoyf225/stack/90from
yf225/stack/92

Conversation

@yf225
Copy link
Copy Markdown
Contributor

@yf225 yf225 commented Apr 2, 2026

Stacked PRs:


[Autotuner] Add crash recovery bash script for unrecoverable CUDA errors

Add scripts/autotune_with_crash_recovery.sh — a bash wrapper that
automatically recovers from CUDA errors (illegal memory access,
misaligned address, etc.) that poison the GPU context and kill the
autotuning process.

How it works:

  • Before each benchmark, the autotuner writes the current config to a
    pending file (_pending_config.txt) in the checkpoint directory
  • If a CUDA error kills the process, the pending file survives on disk
  • The bash script detects it, appends the poison config to
    _bad_configs.txt, and re-launches the command from scratch
  • On re-launch, the autotuner loads its checkpoint + bad configs list,
    skips the poison config, and continues searching

Usage:
scripts/autotune_with_crash_recovery.sh
--checkpoint-dir /tmp/ckpt -- python train.py

Add scripts/autotune_with_crash_recovery.sh — a bash wrapper that
automatically recovers from CUDA errors (illegal memory access,
misaligned address, etc.) that poison the GPU context and kill the
autotuning process.

How it works:
- Before each benchmark, the autotuner writes the current config to a
  pending file (_pending_config.txt) in the checkpoint directory
- If a CUDA error kills the process, the pending file survives on disk
- The bash script detects it, appends the poison config to
  _bad_configs.txt, and re-launches the command from scratch
- On re-launch, the autotuner loads its checkpoint + bad configs list,
  skips the poison config, and continues searching

Usage:
  scripts/autotune_with_crash_recovery.sh \
      --checkpoint-dir /tmp/ckpt -- python train.py

stack-info: PR: #1922, branch: yf225/stack/92
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 2, 2026
@yf225 yf225 closed this Apr 2, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant