Profile GPU kernels at source-line granularity with cycle-level timing and stall analysis. Use when identifying performance hotspots at the source code level or analyzing instruction-level metrics mapped to source lines.
---
name: linex-profiling
description: Profile GPU kernels at source-line granularity with cycle-level timing and stall analysis. Use when identifying performance hotspots at the source code level or analyzing instruction-level metrics mapped to source lines.
---
# Linex: Source-Level GPU Performance Profiling
Map GPU performance metrics to your source code lines. Get cycle-level timing, stall analysis, and instruction-level metrics for each line of source code.
## When to Use
- User asks to profile a GPU application at source-line granularity
- Need to identify which specific lines of code are performance bottlenecks
- Analyzing stall patterns and execution bottlenecks at the source level
- Understanding cycle-level timing for each line of code
- Instruction-level analysis mapped to source lines
## Instructions
1. **Ensure the target runs on AMD ROCm 7.0+** with `rocprofv3` available.
2. **Kernels must be compiled with `-g`** (debug symbols) for source mapping.
3. **Choose execution path:**
- If a Linex MCP server is available, use its MCP tools:
- `profile_application` to run and profile a target application with the options below.
- `analyze_instruction_hotspots` to perform instruction-level hotspot analysis on collected profiles.… install to load the full skill