triton-ascend-optimization

Optimize Triton Ascend kernels for Atlas A2/A3 backends.

258|48|Updated Jun 22, 2020
One-click install
npx skills add https://github.com/mindspore-ai/akg --skill triton-ascend-optimization-mindspore-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: triton-ascend-optimization
Source: https://github.com/mindspore-ai/akg/tree/main/akg_agents/python/akg_agents/op/resources/skills/triton-ascend/fundamentals/triton-ascend-optimization
Command: npx skills add https://github.com/mindspore-ai/akg --skill triton-ascend-optimization-mindspore-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides general strategies for optimizing Triton Ascend kernels on Atlas A2/A3, including BLOCK_SIZE selection and grid configuration to maximize performance across elementwise and matrix operations.

Core Features & Use Cases

  • Block size tuning: recommends BLOCK_SIZE ranges for elementwise (1024-2048) and warns to keep values < 65536.
  • Grid configuration guidance: use VEC_CORE_NUM / CUBE_CORE_NUM; 2D/3D grids for matmul/conv/reduce; 1D grid + inner loop for elementwise/pointwise.
  • Memory alignment & autotuning: 256B alignment for transfers; autotune block-size patterns; fp16/fp32 precision conversion; bind via keywords.
  • Use Case: Apply to performance optimization tasks on Triton Ascend kernels for Atlas hardware.

Quick Start

Provide a Triton Ascend kernel optimization plan using the recommended BLOCK_SIZE and grid settings for an Atlas A2/A3 workload.

Frequently Asked Questions about triton-ascend-optimization

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

FAQPage Schema
How do I choose the right BLOCK_SIZE for Triton Ascend kernels on Atlas hardware?

For Triton Ascend kernel optimization, set BLOCK_SIZE to 1024-2048 for elementwise operations, keep values under 65536, and apply autotuning patterns to finalize the optimal configuration for Atlas A2/A3.

What is the best way to configure grids for matmul and reduce kernels in Triton Ascend?

The best grid configuration for matmul, conv, and reduce kernels uses 2D or 3D grids with VEC_CORE_NUM or CUBE_CORE_NUM, while elementwise operations should use a 1D grid combined with an inner loop.

Can I use autotuning for block size selection on Atlas A2 and A3 backends?

Yes, you can use autotuning for block size selection on Atlas A2 and A3 backends by binding keywords to autotune configurations, ensuring optimal BLOCK_SIZE selection across different kernel operations.

Does Triton Ascend kernel optimization require specific memory alignment for data transfers?

Triton Ascend kernel optimization requires 256B data alignment for memory transfers to maximize performance, alongside proper fp16 and fp32 precision conversion strategies on Atlas hardware.

Why does my Triton Ascend elementwise kernel experience performance drops on Atlas hardware?

Performance drops in Triton Ascend elementwise kernels often occur when BLOCK_SIZE exceeds recommended ranges or lacks 256B memory alignment, requiring autotuning and grid configuration adjustments.