Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

warp-compile-time-optimizer

БесплатноЗапускает вложенные скриптыНе проверен

Use when compile time or startup time is the problem in code that uses Warp: a request to improve, optimize, or cut compile times; an app that is slow to…

NVIDIAот NVIDIA★ 4 269 звёзд на GitHub

Об этом скилле

Warp cold-start compile time

Start with a runnable command

The probe runs the target in a subprocess, writes only to temporary directories, and needs no network, external tool servers, or Warp checkout.

Script Purpose Arguments
scripts/warp_compile_probe.py Measure isolated cold/warm compilation and launches. measure [OPTIONS] -- COMMAND...; use --help.

Use run_script("scripts/warp_compile_probe.py", args=[...]) when supported; otherwise use the Python command below. The target must run to completion.

Compilation model

Warp compiles modules, not individual kernels. A module's identity is:

(live kernel & function set) x (module options) x (CUDA block_dim) x (generic instances)

Each identity requires code generation and native compilation for the full module.

Cold-start cost is roughly:

number of distinct module identities you touch  x  size of each module

Reduce it in two ways:

  1. Stop identity churn. A module that changes after loading compiles again.
  2. Stop source duplication. A module used at three block dimensions compiles every kernel three times.

Deleting one kernel from a module that still builds saves only part of one build. Removing an unnecessary module identity saves the full build.

When neither applies, overlap independent CUDA builds (CS-13). This changes when work happens, not how much is compiled, so judge it on elapsed time.

When a module's options are fixed

Options have two deadlines:

  1. Module creation (Python import). The module copies enable_backward, max_unroll, lineinfo, deterministic, deterministic_max_records, and compile_time_trace from warp.config. Setting a global later is silently ignored by that module. default_grid_stride is the exception.
  2. First load. Before compilation, change the existing module with wp.set_module_options() or wp.get_module(name).options. Changing an option after load creates a new identity and rebuilds the module (CS-3).
Missed deadline Symptom Cost
wp.config.* set after import hash unchanged, option silently absent the entire benefit, invisibly
module options set after load a second hash, module builds twice one extra build, visible in the trace

After changing an option, confirm the hash moved for every target module. An unchanged hash means the option never arrived.

Preserve behavior

Change how Warp compiles the code, not the workload.

Do not delete or merge kernels to claim a gain. Apparently redundant stages may preserve ownership, aliasing, retained outputs, numerical boundaries, or API behavior. Fix duplication at the module level.

Preserve every launch and its order, dimensions, dtypes, devices, block dimensions, gradients, numerical modes, dynamic/plugin behavior, and public API signatures. Keep kernel names when moving definitions to module scope because logs, cache artifacts, and external tools expose them.

Instructions

1. Find the real cost, and confirm it is compilation

Ask what command the user actually waits on, then measure it cold:

python scripts/warp_compile_probe.py measure --samples 3 \
    --json baseline.json -- <the user's command>

The probe gives each sample private WARP_CACHE_PATH, WARP_CACHE_ROOT, and CUDA_CACHE_PATH directories, enables module timers, and records launches. It creates those directories under the system temporary directory and removes them itself, so isolating a sample never requires writing a cache into the project or deleting anything to re-measure. Isolate a hand-rolled sample the same way. Never clear a live cache with wp.clear_kernel_cache() or wp.clear_lto_cache(); clearing is not isolated and can disrupt other processes.

Read the probe output before source. If compilation is a small part of wall time, report the real bottleneck and stop. For libraries and tests, use the smallest command that compiles the workload's modules.

Modules that each compiled once, with no repeated hashes, block-dimension variants, or LTO, have no structural churn. This rules out redundant builds, not oversized builds; still check cache reuse (CS-2), backward codegen (CS-10), unrolling (CS-11), the precompiled header (CS-12), and overlap when several CUDA modules remain (CS-13).

Every sample also re-runs the command against the cache it just populated. If warm module work is not near zero, diagnose cache reuse (CS-2) before changing module structure.

2. Ask about runtime tradeoffs when needed

Apply ordering fixes, lifecycle grouping, and option hoists without asking. Ask before changing fast_math, max_unroll, or a MathDx/tile implementation:

Some of these knobs cut compile time but can make the compiled kernels slower or change numerics. Are you optimizing a fast edit-run loop (where slower kernels are usually fine), or production startup (where they usually are not)?

If the user is u

Полный SKILL.md на GitHub

Установить warp-compile-time-optimizer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Edit
Write
Glob
Grep
env

Вложенные файлы

BENCHMARK.mdconfig/skillspector-baseline.yamlevals/config.ymlevals/evals.jsonevals/files/c01_particle_preprocessing/pyproject.tomlevals/files/c01_particle_preprocessing/src/particle_prep/__init__.pyevals/files/c01_particle_preprocessing/src/particle_prep/__main__.pyevals/files/c01_particle_preprocessing/src/particle_prep/pipeline.pyevals/files/c01_particle_preprocessing/src/particle_prep/plugins.pyevals/files/c01_particle_preprocessing/src/particle_prep/stages.pyevals/files/c04_batch_signals/pyproject.tomlevals/files/c04_batch_signals/src/batch_signals/__init__.pyevals/files/c04_batch_signals/src/batch_signals/__main__.pyevals/files/c04_batch_signals/src/batch_signals/conditioning.pyevals/files/c04_batch_signals/src/batch_signals/maintenance.pyevals/files/c04_batch_signals/src/batch_signals/runtime.pyevals/files/g01_pde_stepper/pyproject.tomlevals/files/g01_pde_stepper/src/pde_stepper/__init__.pyevals/files/g01_pde_stepper/src/pde_stepper/__main__.pyevals/files/g01_pde_stepper/src/pde_stepper/boundaries.pyevals/files/g01_pde_stepper/src/pde_stepper/operators.pyevals/files/g01_pde_stepper/src/pde_stepper/solver.pyevals/files/g02_stencil_bank/pyproject.tomlevals/files/g02_stencil_bank/src/stencil_bank/__init__.pyevals/files/g02_stencil_bank/src/stencil_bank/__main__.pyevals/files/g02_stencil_bank/src/stencil_bank/analysis.pyevals/files/g02_stencil_bank/src/stencil_bank/loss.pyevals/files/g02_stencil_bank/src/stencil_bank/stencils.pyevals/files/g04_image_pyramid/pyproject.tomlevals/files/g04_image_pyramid/src/image_pyramid/__init__.pyevals/files/g04_image_pyramid/src/image_pyramid/__main__.pyevals/files/g04_image_pyramid/src/image_pyramid/adaptive.pyevals/files/g04_image_pyramid/src/image_pyramid/filters.pyevals/files/g04_image_pyramid/src/image_pyramid/pyramid.pyevals/files/g06_gpu_analytics/pyproject.tomlevals/files/g06_gpu_analytics/src/gpu_analytics/__init__.pyevals/files/g06_gpu_analytics/src/gpu_analytics/__main__.pyevals/files/g06_gpu_analytics/src/gpu_analytics/analytics.pyevals/files/g06_gpu_analytics/src/gpu_analytics/diagnostics.pyevals/files/g06_gpu_analytics/src/gpu_analytics/reductions.py

FAQ

Что делает скилл warp-compile-time-optimizer?

Use when compile time or startup time is the problem in code that uses Warp: a request to improve, optimize, or cut compile times; an app that is slow to start or stalls at the first wp.launch; seconds of compiling before real work begins; JIT modules recompiling on every run or every CI job. Only applies when the code being optimized uses Warp kernels. Not for steady-state kernel runtime, memory, correctness, building Warp itself from source, or nvcc/C++ build times.

Как установить скилл warp-compile-time-optimizer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл warp-compile-time-optimizer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить warp-compile-time-optimizer с