Individual skill
cpu-kernel-authoring
Use when writing, optimizing, or benchmarking a C++ CPU kernel with AVX2 or AVX512 intrinsics for the Hugging Face kernels ecosystem. Not for CUDA kernels: use cuda.
.devin/skills/cpu-kernel-authoring/SKILL.md
Source commit b0e8ce89a19fac880251dc3ea1babfeb4503a4fe
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Local scripts
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 55
- Repository last updated
- Sep 28, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- odd Repository topic
- odin Repository topic
- outline Repository topic
- outlines Repository topic
- coding-paradigm Repository topic
- outline-driven-development Repository topic
- claude-plugins Repository topic
- codex-cli Repository topic
- gemini-cli-extensions Repository topic
- outline-driven Repository topic
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 10,944 bytesSKILL.mdcore · 10,944 bytesSKILL.mdcore · 10,944 bytesagents/openai.yamlasset · 250 bytesreferences/brgemm_patterns.yamlasset · 14,484 bytesreferences/build_system.mddoc · 7,931 bytesreferences/correctness.yamlasset · 6,037 bytesreferences/dtype_optimizations.yamlasset · 4,214 bytesreferences/huggingface-kernels-integration.mddoc · 4,550 bytesreferences/implementation_reference.mddoc · 12,527 bytesreferences/memory_patterns.yamlasset · 3,559 bytesreferences/optimization_levels.yamlasset · 5,946 bytesreferences/optimization_strategies.mddoc · 4,919 bytesreferences/quantized_gemm_patterns.yamlasset · 19,032 bytesreferences/runtime_dispatch.yamlasset · 8,742 bytesreferences/simd_optimization_patterns.yamlasset · 7,154 bytesreferences/threading_patterns.yamlasset · 3,072 bytesreferences/workflow_details.mddoc · 8,921 bytesscripts/analyze_op.pyruns · 11,282 bytesscripts/benchmark_cpu.pyruns · 17,051 bytesscripts/config.pyruns · 1,014 bytesscripts/config.yamlasset · 641 bytesscripts/cpu_profiler.pyruns · 11,735 bytesscripts/trial_manager.pyruns · 21,533 bytesscripts/validate_cpu_kernel.pyruns · 13,403 bytes
Read excerpt
# CPU kernel authoring
## Contract
| Field | Bound contract |
|---|---|
| Trigger | A C++ CPU kernel for the Hugging Face kernels ecosystem must be written, optimized, or benchmarked with AVX2 or AVX512 intrinsics against a PyTorch baseline. |
| Authority | Reversible local. Writes C++ kernel sources, `build.toml`, and `torch_binding.cpp` under the kernel directory, a wheel under `dist/`, the installed kernel package in the active Python environment, and trial state under `trials/<kernel_name>/` and `output/`. Rollback is version control for the sources, `pip uninstall <package>` for the package, and removal of `dist/`, `trials/<kernel_name>/`, and `output/`. No remote mutation. |
| Side effect | Kernel sources and build files change; a wheel is built and installed; trial directories and result records accumulate. |
| Done | The kernel passes the correctness check in `scripts/benchmark_cpu.py`, every trial up to `max_trials` has run or the speedup exceeded `early_stop_speedup`, and the best trial is finalized into `output/` with its final measurement; or a failure class from the table below is reported with the recovery step taken. |
## Inputs
- Kernel name (required): the trial-tree label, for example `my_rmsnorm`. Used only by `trial_manager.py`, which accepts it as a single directory name under `trials/`, never a path.