warp-compile-time-optimizer

Diagnose and reduce JIT compilation and cold-start latency in NVIDIA Warp applications.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill warp-compile-time-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: warp-compile-time-optimizer
Source: https://github.com/NVIDIA/skills/tree/main/skills/warp-compile-time-optimizer
Command: npx skills add https://github.com/NVIDIA/skills --skill warp-compile-time-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires warp-lang, and includes scripts (resource) and references (resource) components.

What problem does it solve?

NVIDIA Warp applications can stall for seconds at startup or on every CI run because JIT modules recompile unnecessarily. This Skill measures cold-start compilation with an isolated-cache probe, identifies which of thirteen known mechanisms (module identity churn, block-dimension duplication, discarded caches, unused backward codegen, MathDx LTO, serial builds, and more) is responsible, and guides a verified fix that preserves the workload.

Core Features & Use Cases

  • Isolated measurement probe: scripts/warp_compile_probe.py runs any command with fresh Warp and CUDA caches, records module identities, hashes, block dimensions, launch topology, and warm-pass reuse, then compares baseline and candidate runs while rejecting workload changes.
  • Thirteen documented mechanisms: references/mechanisms.md maps each probe signal (repeated hashes, block_dim spread, LTO artifacts, cache-not-reused) to a specific cause, fix, limits, and measured evidence.
  • Rigorous verification protocol: references/measurement.md defines noise bands, median/MAD statistics, launch-topology equivalence checks, and reporting rules so gains are real rather than measurement artifacts.
  • Use Case: A CI pipeline pays a large one-time cost every time a Warp particle-preprocessing package starts. The Skill measures the cold run, finds modules rebuilt due to late option changes, hoists the options before first load, and confirms the reduction with before/after medians while preserving every kernel launch and numeric result.

Quick Start

Ask your agent to measure and reduce the Warp compile time of your application, for example: "My Warp app stalls for seconds at the first wp.launch — find out why and cut the compile time without changing results."

Frequently Asked Questions about warp-compile-time-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Warp compile time at application startup?

Measure the cold run with the probe script using isolated Warp and CUDA caches, then match the reported module identities to a mechanism: repeated hashes indicate identity churn, multiple block_dim values indicate per-dimension recompilation, and a costly warm pass indicates the cache is never reused. Apply the corresponding fix and re-measure with the compare command.

Why does my Warp module recompile on every run?

Repeated compilation usually means the cache is discarded between runs, caused by wp.clear_kernel_cache() left in code, wp.config.cache_kernels set to False, a temporary kernel_cache_dir deleted at exit, or CUDA_CACHE_DISABLE in the environment. It can also come from module options or kernels defined after the module's first load, which change the module hash.

Does this Skill help with slow Warp kernel runtime or memory issues?

No. It only addresses compile time and startup latency in code that uses Warp kernels. Steady-state kernel throughput, memory capacity, numerical correctness, building Warp itself from source, and nvcc/C++ build times are explicitly out of scope.

Can I disable enable_backward to speed up Warp compilation?

Yes, for forward-only modules, but set wp.config.enable_backward before importing the library or update the module options before first load, since modules copy the option at import time. First verify with a wp.Tape that nothing differentiates those kernels, because disabling backward silently breaks gradients.

What are the requirements for using the Warp compile probe?

The probe requires Python 3.10+ and an installed warp-lang package, and a CUDA device is needed to diagnose CUDA-specific mechanisms. It runs your command in a subprocess with private temporary cache directories, needs no network or Warp source checkout, and never writes into the measured project.

Why did my Warp compile-time measurement show no improvement after a fix?

Results inside the noise band of max(1% of baseline, 2x baseline MAD) are inconclusive. On CPU a large fixed toolchain cost can make a real structural fix show only a small percentage, and cache fixes improve warm runs rather than cold time, so check the warm pass and structural counts instead of the cold headline.