sglang-diffusion-ako4all-kernel

Optimize SGLang diffusion kernels via AKO4ALL tuning and validation workflows.

Updated Jun 16, 2026
One-click install
npx skills add https://github.com/spacecat2002/oscar --skill sglang-diffusion-ako4all-kernel-spacecat2002
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-diffusion-ako4all-kernel
Source: https://github.com/spacecat2002/oscar/tree/main/sglang-research/python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-ako4all-kernel
Command: npx skills add https://github.com/spacecat2002/oscar --skill sglang-diffusion-ako4all-kernel-spacecat2002

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a disciplined workflow for optimizing existing SGLang diffusion kernels without relying on unvalidated microbenchmark improvements or leaving the AKO4ALL tuning repository in an inconsistent state.

Core Features & Use Cases

  • AKO4ALL Repository Hygiene: Clones or refreshes a sibling AKO4ALL repository and verifies its branch, remotes, cleanliness, and synchronization with upstream before tuning begins.
  • Kernel Optimization Loop: Builds a custom harness, establishes correctness and performance baselines, profiles representative shapes with ncu, and records one-change-at-a-time optimization iterations.
  • Production Validation: Ports the best candidate back to SGLang and validates it with targeted tests, kernel benchmarks, denoise performance dumps, end-to-end comparisons, and generated model outputs.
  • Use Case: When profiling identifies a slow Triton or CUDA diffusion kernel, use this Skill to reproduce it in AKO4ALL, measure candidate improvements, diagnose the hardware-level cause, and confirm that the win transfers to real model denoising.

Quick Start

Use the SGLang diffusion AKO4ALL kernel skill to optimize the identified hotspot, validate it on representative shapes, and prepare before-and-after performance evidence.

Frequently Asked Questions about sglang-diffusion-ako4all-kernel

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

FAQPage Schema
How do I optimize Triton diffusion kernels in SGLang after profiling identifies a hotspot?

To optimize SGLang diffusion kernels, you reproduce the hotspot in a clean AKO4ALL repository, establish correctness and performance baselines, profile representative shapes with ncu, and iterate one-change-at-a-time improvements before porting the best candidate back.

How does ncu profiling work for diagnosing slow CUDA JIT or Triton diffusion kernels?

ncu profiling in this workflow measures representative shapes to diagnose hardware-level causes of slow diffusion kernels. It establishes a performance baseline and records targeted optimization iterations to ensure improvements are validated before integration.

Can I validate Triton kernel optimizations against real model denoising for FLUX or Qwen?

Yes, production validation ports the tuned kernel back to SGLang and runs targeted tests, kernel benchmarks, and denoise performance dumps to confirm the optimization transfers to real model denoising for Qwen, FLUX, Wan, Hunyuan, and MOVA.

Do I need a clean upstream-synchronized AKO4ALL repository before tuning SGLang kernels?

Yes, AKO4ALL repository hygiene is required before tuning begins. The workflow clones or refreshes a sibling repository and verifies its branch, remotes, cleanliness, and synchronization with upstream to prevent inconsistent tuning states.

What's the best way to prevent unvalidated microbenchmark improvements when optimizing CUDA diffusion kernels?

The best way to prevent unvalidated microbenchmark improvements is building a custom harness that establishes correctness baselines first, then recording one-change-at-a-time optimization iterations with ncu profiling and end-to-end denoise validation.

Why does my optimized Triton kernel fail to transfer performance wins to actual diffusion model denoising?

Performance wins fail to transfer when kernels are validated only through microbenchmarks. This workflow requires model-level denoise validation, performance dumps, and generated output comparisons to ensure the optimization survives real diffusion workloads.