write-fp8-kernel

write-fp8-kernel is a skill for Claude Code, Codex from tensormux/kernel-skills. It costs 0 tokens per session (3,674 once invoked), scanned A, original, MIT.

A guide for designing and implementing FP8 GPU kernels. FP8 is an 8-bit floating-point format used to reduce memory use and increase throughput on supported NVIDIA GPUs, with scaling and conversion steps to preserve accuracy.

In plain words
What is it for?
Use it for inference or training kernels such as matrix multiplication, attention, or linear layers on NVIDIA Hopper or Ada GPUs, including fused quantization and dequantization.
Why use it?
It helps choose FP8 formats and scaling methods while accounting for the limits of Hopper and Ada hardware. It also helps decide when FP8 is unsuitable because the target hardware or data range cannot support it well.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for inference or training kernels such as matrix multiplication, attention, or linear layers on NVIDIA Hopper or Ada GPUs, including fused quantization and dequantization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tensormux/kernel-skills/write-fp8-kernel
Install

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.

Any agent
npx skills add tensormux/kernel-skills --skill write-fp8-kernel
Clone the repo
git clone --depth 1 https://github.com/tensormux/kernel-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for write-fp8-kernel

README.md
[![agentmods](https://agentmods.dev/badge/skills/tensormux/kernel-skills/write-fp8-kernel/github.svg)](https://agentmods.dev/skills/tensormux/kernel-skills/write-fp8-kernel)
Your own site
<a href="https://agentmods.dev/skills/tensormux/kernel-skills/write-fp8-kernel"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/write-fp8-kernel/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.

agentmods 80×15 button for write-fp8-kernel

Your own site · 80×15
<a href="https://agentmods.dev/skills/tensormux/kernel-skills/write-fp8-kernel"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/write-fp8-kernel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03674
Opus 5.5 $0.00000 $0.01470
Sonnet 5.5 $0.00000 $0.00735
Haiku 4.5 $0.00000 $0.00367

Measured 3mo ago against content hash f9e5baece1be, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-fp8-kernel 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.

skills/quantization/write-fp8-kernel/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Write an FP8 Kernel

Purpose

Guide the agent through designing and implementing FP8 compute kernels for inference and training on NVIDIA Hopper (sm_90) and Ada Lovelace (sm_89) hardware, covering FP8 format selection, scaling strategy, tensor core usage via WGMMA or cuBLAS, and dequantization epilogue design.

Use this when

  • Writing a high-throughput GEMM, attention, or linear layer kernel targeting H100 or H200 (sm_90a) hardware where FP8 tensor cores provide 2x the throughput of FP16.
  • Implementing FP8 training (forward pass in E4M3, gradient computation in E5M2) following the transformer engine or similar recipe.
  • Evaluating whether FP8 achieves sufficient accuracy for a given model and activation distribution.
  • Fusing quantization, GEMM, and dequantization into a single pass to avoid expensive fp32 ↔ fp8 conversion round-trips in memory.

Do not use this when

  • The target hardware is pre-Ada (sm_80 or earlier) — FP8 tensor core instructions do not exist. fp16 or bf16 is the correct choice.
  • The activation range is highly dynamic or the per-tensor scale would need to be recomputed at sub-batch granularity with prohibitive overhead.
  • Numerical accuracy has not been validated for the target model. FP8 E4M3 has a much narrower dynamic range than fp16; overflows and underflows silently corrupt outputs without per-tensor or per-channel scaling.
  • The simpler option (FP16 GEMM via cuBLAS or CUTLASS with a Flash Attention kernel) already meets the performance target.

Inputs the agent should gather first

  • Hardware target: H100/H200 (sm_90a), RTX 4090/Ada (sm_89), or other. WGMMA instructions are H100-specific (sm_90a). Ada exposes FP8 via cuBLAS/CUTLASS but without WGMMA.
  • FP8 format: E4M3 (4-bit exponent, 3-bit mantissa, max representable value ≈ 448) for forward pass weights and activations; E5M2 (5-bit exponent, 2-bit mantissa, max ≈ 57344) for gradients. Clarify which is needed.
  • Scaling strategy: per-tensor (one scale for the whole tensor), per-channel/per-row (one scale per row or column), or delayed scaling (track amax history across steps and update scales at a fixed interval). Transformer Engine uses delayed scaling.
  • Accumulation dtype: fp32 is mandatory for FP8 tensor core accumulation. DO NOT use fp16 accumulators with FP8 inputs — precision loss is severe.
  • Output dtype: fp16, bf16, or fp32 after dequantization. This determines the epilogue.
  • Operation type: GEMM only, GEMM + bias, attention (QK^T scaling), or custom fused operation.
  • Whether cuBLAS FP8 API or CUTLASS FP8 templates are acceptable: these should be the default choice unless there is a specific reason for a custom kernel.

Read the full file on GitHub · 126 lines

Files

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.

Changes

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.

  1. 3mo ago First seen · 126 lines · 0 tokens per session scan A f9e5baece1be

Subscribe to this mod's changes

write-fp8-kernel 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,674 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.

Related

write-fp8-kernel compared with skills from other repositories

write-fp8-kernel next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-fp8-kerneltensormux/kernel-skillsSkill935mo agoMITA0Claude Code, Codex
sm120_swapabflashinfer-ai/flashinferSkill7.0ktodayApache-2.0A0Claude Code, Codex
kimi_k3flashinfer-ai/flashinferSkill7.0ktodayApache-2.0A0Claude Code, Codex
deepep-to-cam-converterXiaoLuoLYG/GODSkill1.3k5d agoApache-2.0A63Claude Code, Codex
akg-agentsXiaoLuoLYG/GODSkill1.3k5d agoApache-2.0A75Claude Code, Codex
embedded-iottravisjneuman/.claudeSkill115yesterdayMITA80Claude Code
datacake-webhookshookdeck/webhook-skillsSkill1043d agoMITA62Claude Code, Codex