Individual skill
optimize-triton-ascend-discrete-loads
Optimize bounded discrete reads in Triton-Ascend by staging a contiguous source vector in UB and selecting elements with tl.gather. Use when an agent implements out = x[idx], ports arbitrary global-memory gathers from GPU, or sees scalarized indirect loads and the complete source domain is small enough to fit on chip.
skills/optimize-triton-ascend-discrete-loads/SKILL.md
Source commit 4ab5ee7adf47755ecd42723f55f4c58e38be95a7
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- 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
- engineering 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
Read excerpt
# Optimize Triton-Ascend Discrete Loads
## Goal
Replace repeated indirect global reads with one contiguous global-to-UB transfer followed by on-chip gather.
## Workflow
1. Confirm the source domain length M is bounded and fits the UB budget.
2. Load x[0:M] contiguously into an on-chip vector.
3. Load the N indices and validate both lower and upper bounds.
4. Replace invalid indices with a safe value before tl.gather.
5. Gather along the source axis and store only valid outputs.