Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tensormux/kernel-skills --skill avoid-warp-divergencegit clone --depth 1 https://github.com/tensormux/kernel-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tensormux/kernel-skills/avoid-warp-divergence)<a href="https://agentmods.dev/skills/tensormux/kernel-skills/avoid-warp-divergence"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/avoid-warp-divergence/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tensormux/kernel-skills/avoid-warp-divergence"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/avoid-warp-divergence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.03187 |
| Opus 5.5 | $0.00000 | $0.01275 |
| Sonnet 5.5 | $0.00000 | $0.00637 |
| Haiku 4.5 | $0.00000 | $0.00319 |
Grade A, and why
avoid-warp-divergence scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: Avoid Warp Divergence
Purpose
Guide the agent through identifying, classifying, and restructuring warp divergence in CUDA kernels — distinguishing avoidable from unavoidable divergence, applying correct restructuring strategies, and assessing the real performance impact before spending engineering effort.
Use this when
- Profiling shows a high
sm__thread_inst_executed_pipe_alu_pred_on_pct/sm__inst_executedratio indicating significant predicated-off execution, or Nsight Compute'sbranch_efficiencyis notably below 100% - The kernel contains data-dependent branches where different threads in a warp take different paths based on their input data
- The kernel has irregular loop bounds or early-exit conditions that vary per thread
- Sparse or masked computation (e.g., attention masks, pruning masks) introduces branches that not all threads in a warp satisfy
Do not use this when
- The branches are on values that are uniform across the entire warp (e.g., checking a kernel argument or a loop bound that all threads compute identically): these do not cause divergence
- The divergent code is only at the boundary of the input (e.g., the last partial tile): this is unavoidable boundary divergence, and the performance impact is typically negligible for large inputs
- The kernel is memory-bandwidth-bound: eliminating divergence in a memory-bound kernel may not improve throughput because the bottleneck is not instruction throughput
- The divergence restructuring would require significant data reorganization that introduces worse memory access patterns: weigh the tradeoff explicitly
Inputs the agent should gather first
- The divergent code region: what is the branch condition? Is it a simple if/else, a loop with data-dependent bounds, or an early exit?
- What determines the branch: is it a function of thread index only (geometry-based), a function of input data values (data-dependent), or a function of a uniform warp-level value?
- Warp occupancy of each branch path: roughly what fraction of threads in a warp are expected to take each path? If 31 out of 32 threads take the same path and 1 takes the other, the impact is low. If 16 take each path, the serialization cost is highest.
- Branch body complexity: how many instructions are in the divergent region? A 2-instruction divergent branch has negligible cost even with full serialization. A 100-instruction divergent loop body is expensive.
- Hardware target: SM architecture. All current NVIDIA GPUs use the same 32-thread warp SIMT model.
- Whether the divergence is data-dependent or geometry-based: this determines which restructuring strategies apply.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 99 lines · 0 tokens per session scan A 84404333e5c6
avoid-warp-divergence is a skill published in the GitHub repository tensormux/kernel-skills (93 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,187 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
avoid-warp-divergence compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| avoid-warp-divergencetensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| diagnoseMagicKidd/Rokid-agentic-workflow | Skill | 3 | 5mo ago | none | A | 66 | Claude Code, Codex |
| agenttrace-session-auditsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 34 | Claude Code |
| test-failure-explorerQwenLM/qwen-code | Skill | 31k | today | Apache-2.0 | A | 32 | Claude Code, Codex |
| code-review-graphtirth8205/code-review-graph | Skill | 33k | 13d ago | MIT | A | 84 | Codex |
| sglang-diffusion-benchmark-profilesgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 26 | Claude Code, Codex |
| oversight-teammvschwarz/openrig | Skill | 9.0k | today | Apache-2.0 | A | 117 | Claude Code, Codex |