Individual skill

vectorize-triton-ascend-comparisons

Vectorize explicit integer comparisons in Triton-Ascend by casting bounded index vectors to float32 before tl.where or similar compute expressions. Use when an agent observes scalarized int32 or int64 comparison code on Ascend NPU, especially in LayerNorm tail handling, while load/store masks already compile efficiently.

skills/vectorize-triton-ascend-comparisons/SKILL.md

Read pinned source

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.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Vectorize Triton-Ascend Comparisons

## Goal

Move eligible explicit comparisons onto Ascend vector cast and compare instructions without changing mask semantics.

## Workflow

1. Identify comparisons used in compute expressions such as tl.where, not only load/store masks.
2. Prove that all compared integer values are exactly representable in float32.
3. Cast the index vector to tl.float32 immediately before the comparison.
4. Keep original integer offsets for pointer arithmetic and memory masks.
5. Inspect performance and compare results around the tail boundary.