Individual skill
build-triton-ascend-fused-softmax
Build a fused row-wise softmax kernel for Triton-Ascend with stable reductions, power-of-two padding, strided rows, and masked memory operations. Use when an agent needs to fuse max, exponentiation, sum, and normalization for a two-dimensional NPU tensor or adapt this reduction pattern to a similar row-wise operator.
skills/build-triton-ascend-fused-softmax/SKILL.md
Source commit 4ab5ee7adf47755ecd42723f55f4c58e38be95a7
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Instructions only
- 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)
- 189
- Repository last updated
- Aug 15, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai Repository topic
- ascend Repository topic
- ascend-npu Repository topic
- npu Repository topic
- triton Repository topic
- triton-ascend Repository topic
- claude-code Repository topic
- codex Repository topic
- opencode Repository topic
- operations Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Read excerpt
# Build Triton-Ascend Fused Softmax
## Goal
Compute softmax across the last dimension while reading each input row once and writing each output row once.
## Workflow
1. Interpret the input as n_rows by n_cols and preserve its row stride.
2. Choose BLOCK_SIZE as the next power of two greater than or equal to n_cols.
3. Let each program process rows separated by tl.num_programs(0).
4. Load a padded row with -inf outside n_cols.
5. Subtract the row maximum, exponentiate, reduce the sum, normalize, and store with the original mask.