triton-cuda-reduce

Design Triton CUDA reduction kernels for multi-dimensional tensor sums, means, and extrema.

6|1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill triton-cuda-reduce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: triton-cuda-reduce
Source: https://github.com/xchang1121/AutoResearch-CC-hook/tree/main/skills/triton-cuda/guides/triton-cuda-reduce
Command: npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill triton-cuda-reduce

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Redesign and implement high-performance CUDA reduction kernels for multi-dimensional tensors using Triton, enabling scalable, numerically stable reductions in ML workloads.

Core Features & Use Cases

  • Provide Triton-based reduction patterns for sum, mean, max/min, softmax, and layernorm-like reductions across arbitrary dimensions.
  • Guidance on numerical stability, block-wise reductions, atomic aggregation, and per-row processing for large tensors.
  • Use cases include fast attention score computations, normalization layers, and summary statistics in large-scale models.

Quick Start

Implement a reduce kernel for a given tensor using the Triton CUDA guide.

Frequently Asked Questions about triton-cuda-reduce

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

FAQPage Schema
How do I implement high-performance CUDA reduction kernels for multi-dimensional tensors using Triton?

Triton reduction kernels handle multi-dimensional tensors by applying block-wise reductions, atomic aggregation, and per-row processing to achieve scalable performance for sums, means, and max/min operations across arbitrary axes.

What is the best way to ensure numerical stability when computing softmax in Triton?

Numerical stability in Triton softmax is maintained through multi-stage reductions that prevent overflow, enabling safe and accurate normalization for large-scale machine learning workloads.

Can I use Triton reduction patterns for attention score computations and normalization layers?

Triton reduction patterns support fast attention score computations and normalization layers by providing reusable kernel designs that efficiently aggregate data across arbitrary tensor dimensions.

Why does my Triton reduce kernel struggle with large tensors and how can I optimize it?

Large tensors require optimized Triton strategies like block-wise reductions and atomic aggregation to handle memory limits, ensuring efficient per-row processing and stable parallel execution.

Do I need specific multi-stage reduction patterns to compute summary statistics in Triton?

Computing summary statistics in Triton benefits from multi-stage reduction patterns to accurately aggregate large tensor data, providing reusable kernel structures for scalable ML workloads.