kernel-loop

Orchestrate evidence-gated one-variable optimization loops for CUDA, CUTLASS, CuTe DSL, or Triton GPU kernels.

14|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/fmh66/kernel-opt-agent --skill kernel-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kernel-loop
Source: https://github.com/fmh66/kernel-opt-agent/tree/main/skills/kernel-loop
Command: npx skills add https://github.com/fmh66/kernel-opt-agent --skill kernel-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It reduces the risk of performance regressions by turning GPU kernel optimization into a disciplined, evidence-backed iteration loop with correctness and Nsight Compute (NCU) gates between changes.

Core Features & Use Cases

  • Measured one-change iterations: Forces each version transition to apply exactly one independent performance variable, preserving prior work and preventing bundled tactics.
  • Guardrails and traceability: Requires correctness, NCU artifacts, KBS evidence, and a structured hypothesis before allowing the next version to be created.
  • Deterministic end-to-end loop orchestration: Coordinates the expected artifact layout, iteration gating script, and final reporting/benchmark step sequencing across existing profiling, KBS, and benchmarking skills.

Quick Start

Tell your system to run the kernel-loop using your baseline kernel as v0 and provide the required inputs (kernel, ref.py, implementation, dims, and optional GPU and iteration count) so it can iteratively validate, profile, gather KBS evidence, apply one-variable hypotheses, and produce final benchmark and report artifacts.

Frequently Asked Questions about kernel-loop

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

FAQPage Schema
How do I prevent performance regressions during GPU kernel optimization?

GPU kernel optimization prevents regressions by enforcing an evidence-gated loop requiring correctness verification and Nsight Compute profiling before accepting any single-variable code change. This disciplined approach mandates KBS-backed hypotheses between versions to ensure traceability.

How does evidence-gated iteration work for CUDA kernel tuning?

Evidence-gated iteration applies exactly one independent performance variable per version transition, then requires correctness validation, Nsight Compute artifacts, and KBS evidence to pass a gate script before creating the next kernel version. This prevents bundled optimization tactics and preserves prior work.

Can I use this optimization loop with Triton or CUTLASS kernels?

Yes, the optimization loop orchestrates iterative performance tuning for CUDA, CUTLASS, CuTe DSL, and Triton GPU kernels. It preserves dimensions and measurement settings throughout the benchmarking and Nsight Compute profiling process across all supported frameworks.

What inputs do I need to start iterative GPU kernel benchmarking?

To start iterative GPU kernel benchmarking, you need a baseline kernel as version zero, a reference Python file, the implementation, dimensions, and optional GPU and iteration count specifications. These inputs enable the system to iteratively validate, profile, and generate final benchmark artifacts.

Why should I use one-variable-at-a-time optimization for GPU kernels?

One-variable-at-a-time optimization forces each version transition to apply exactly one independent performance variable, preventing bundled tactics that obscure which change caused a performance shift. This ensures traceability and reduces the risk of introducing hidden regressions during GPU kernel tuning.