lds-optimization

Diagnose LDS bank conflicts and latency stalls from GPU kernel trace data.

2|3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/fsx950223/claude-stuff --skill lds-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lds-optimization
Source: https://github.com/fsx950223/claude-stuff/tree/main/.claude/skills/lds-optimization
Command: npx skills add https://github.com/fsx950223/claude-stuff --skill lds-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill optimizes Local Data Share (LDS) access patterns in GPU kernels, diagnosing and resolving performance bottlenecks like bank conflicts and latency stalls.

Core Features & Use Cases

  • Diagnose LDS Bottlenecks: Analyzes trace data to identify issues with LDS access, bank conflicts, and write-read latency.
  • Apply Optimizations: Implements solutions like swizzle layouts, padding, and increasing write-read distance to improve performance.
  • Use Case: When a GPU kernel's performance is hampered by slow shared memory access, this Skill can pinpoint the exact cause and apply targeted fixes to significantly speed up execution.

Quick Start

Use the lds-optimization skill to analyze and fix LDS bottlenecks in the provided kernel trace data.

Frequently Asked Questions about lds-optimization

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

FAQPage Schema
How do I fix LDS bank conflicts in GPU kernels?

To resolve LDS bank conflicts in GPU kernels, apply swizzle or padding layouts and increase write-read distances to eliminate shared memory bottlenecks. This optimizes access patterns by diagnosing trace data to pinpoint exact causes.

Why does my AMD CDNA GPU kernel show high lgkmcnt stalls?

High lgkmcnt stalls on AMD CDNA GPUs indicate Local Data Share access latency. Analyzing trace data identifies ds_read or ds_write latency issues, allowing targeted optimizations like swizzle layouts to resolve the bottlenecks.

How do I optimize Triton LDS access patterns on AMD CDNA GPUs?

Optimizing Triton LDS access patterns on AMD CDNA GPUs involves diagnosing trace data for bank conflicts and latency stalls. Apply swizzle or padding layouts and increase write-read distances to significantly speed up execution.

What causes ds_read latency stalls in GPU shared memory?

ds_read latency stalls in GPU shared memory are caused by bank conflicts and close write-read distances. Diagnosing trace data identifies these LDS access issues, enabling swizzle or padding layout fixes to eliminate bottlenecks.

Can I use swizzle layouts to eliminate LDS bottlenecks in Triton kernels?

Yes, swizzle layouts eliminate LDS bottlenecks in Triton kernels by resolving bank conflicts. Diagnosing trace data exposes write-read latency issues, allowing swizzle or padding layouts to significantly speed up execution.

What trace data do I need to diagnose GPU kernel LDS performance issues?

To diagnose GPU kernel LDS performance issues, trace data must reveal high lgkmcnt stalls or ds_read and ds_write latency. This data identifies bank conflicts, enabling swizzle or padding optimizations to fix bottlenecks.