Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"name": "intellikit",
"owner": {
"name": "AMD Research",
"url": "https://github.com/AMDResearch"
},
"metadata": {
"description": "IntelliKit plugins: AMD GPU/CPU performance, validation, and tracing tools for Claude Code.",
"version": "1.0.0"
},
"plugins": [
{
"name": "accordo",
"source": "./accordo",
"description": "Validate GPU kernel correctness by comparing reference and optimized outputs. Bundles the accordo-validation skill and the accordo MCP server.",
"version": "1.0.0",
"author": {
"name": "Muhammad Awad",
"email": "muhaawad@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/accordo",
"category": "testing",
"tags": [
"gpu",
"rocm",
"validation",
"correctness"
],
"strict": false
},
{
"name": "kerncap",
"source": "./kerncap",
"description": "Extract a GPU kernel from a HIP or Triton application into a standalone reproducer. Bundles the test-kerncap skill and the kerncap MCP server.",
"version": "1.0.0",
"author": {
"name": "Cole Ramos",
"email": "Cole.Ramos@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/kerncap",
"category": "performance",
"tags": [
"gpu",
"rocm",
"hip",
"triton",
"kernel-extraction"
],
"strict": false
},
{
"name": "linex",
"source": "./linex",
"description": "Profile GPU kernels at source-line granularity with cycle-level timing and stall analysis. Bundles the linex-profiling skill and the linex MCP server.",
"version": "1.0.0",
"author": {
"name": "Muhammad Awad",
"email": "muhaawad@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/linex",
"category": "performance",
"tags": [
"gpu",
"rocm",
"profiling",
"source-line"
],
"strict": false
},
{
"name": "metrix",
"source": "./metrix",
"description": "Profile AMD GPU kernels and get human-readable metrics (bandwidth, cache, coalescing, FLOPS). Bundles the metrix-profiling skill and the metrix MCP server.",
"version": "1.0.0",
"author": {
"name": "Muhammad Awad",
"email": "muhaawad@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/metrix",
"category": "performance",
"tags": [
"gpu",
"rocm",
"profiling",
"metrics"
],
"strict": false
},
{
"name": "nexus",
"source": "./nexus",
"description": "Extract GPU kernel assembly and HIP source from HSA packet traces. Bundles the nexus-trace skill and the nexus MCP server.",
"version": "1.0.0",
"author": {
"name": "Muhammad Awad",
"email": "muhaawad@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/nexus",
"category": "performance",
"tags": [
"gpu",
"rocm",
"hsa",
"trace",
"assembly"
],
"strict": false
},
{
"name": "rocm-mcp",
"source": "./rocm_mcp",
"description": "MCP servers for the AMD ROCm ecosystem: hipcc compile, HIP docs, rocminfo, and amd-smi.",
"version": "1.0.0",
"author": {
"name": "Yiannis Papadopoulos",
"email": "ypapadop@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/rocm_mcp",
"category": "development",
"tags": [
"gpu",
"rocm",
"hip",
"compiler",
"docs",
"amd-smi"
],
"strict": false
},
{
"name": "uprof-mcp",
"source": "./uprof_mcp",
"description": "MCP server for profiling CPU code via AMD uProf.",
"version": "1.0.0",
"author": {
"name": "Yiannis Papadopoulos",
"email": "ypapadop@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/uprof_mcp",
"category": "performance",
"tags": [
"cpu",
"uprof",
"profiling"
],
"strict": false
}
]
}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ vector_add_template
# Apptainer images
*.sif


# Resources
resources/
resources/

# Agents
.claude
.codex
37 changes: 25 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ Not all tools follow the same directory structure:

| Tool | Layout | Package Location | C++ Source | Tests | Skills | CLI |
|------|--------|------------------|------------|-------|--------|-----|
| **metrix** | `src/` layout | `metrix/src/metrix/` | N/A | `metrix/tests/` | `metrix/skill/` | Yes |
| **linex** | `src/` layout | `linex/src/linex/` | N/A | `linex/tests/` | `linex/skill/` | No |
| **metrix** | `src/` layout | `metrix/src/metrix/` | N/A | `metrix/tests/` | `metrix/skills/metrix-profiling/` | Yes |
| **linex** | `src/` layout | `linex/src/linex/` | N/A | `linex/tests/` | `linex/skills/linex-profiling/` | No |
| **rocm_mcp** | `src/` layout | `rocm_mcp/src/rocm_mcp/` | N/A | `rocm_mcp/tests/` | N/A | No |
| **uprof_mcp** | `src/` layout | `uprof_mcp/src/uprof_mcp/` | N/A | none yet | N/A | No |
| **accordo** | flat layout | `accordo/accordo/` | `accordo/src/` (runtime compiled) | `accordo/tests/` | `accordo/skill/` | Yes |
| **kerncap** | flat layout | `kerncap/kerncap/` | `kerncap/src/` (CMake built) | `kerncap/tests/` | `kerncap/skill/` | Yes |
| **nexus** | flat layout | `nexus/nexus/` | `nexus/csrc/` (CMake built) | `nexus/tests/` | `nexus/skill/` | No |
| **accordo** | flat layout | `accordo/accordo/` | `accordo/src/` (runtime compiled) | `accordo/tests/` | `accordo/skills/accordo-validation/` | Yes |
| **kerncap** | flat layout | `kerncap/kerncap/` | `kerncap/src/` (CMake built) | `kerncap/tests/` | `kerncap/skills/test-kerncap/` | Yes |
| **nexus** | flat layout | `nexus/nexus/` | `nexus/csrc/` (CMake built) | `nexus/tests/` | `nexus/skills/nexus-trace/` | No |

This affects import paths and where to find source code. Tools with CLI support (`accordo`, `kerncap`, `metrix`) can be used standalone or via MCP. MCP-only tools (`linex`, `nexus`, `rocm_mcp`, `uprof_mcp`) are designed for LLM integration. Each main tool except rocm_mcp and uprof_mcp has a `skill/` directory containing `SKILL.md` files for AI agent integration.
This affects import paths and where to find source code. Tools with CLI support (`accordo`, `kerncap`, `metrix`) can be used standalone or via MCP. MCP-only tools (`linex`, `nexus`, `rocm_mcp`, `uprof_mcp`) are designed for LLM integration. Each main tool except rocm_mcp and uprof_mcp has a `skills/<skill-name>/SKILL.md` directory for AI agent integration; each tool also doubles as a Claude Code plugin (see "Claude Code marketplace" below).

## Dependency Management

Expand Down Expand Up @@ -440,15 +440,15 @@ cd nexus && pytest -v

### Working with Agent Skills

Each main tool (except rocm_mcp and uprof_mcp) has a `skill/` directory with `SKILL.md` files for AI agent integration:
Each main tool (except rocm_mcp and uprof_mcp) has a `skills/<skill-name>/SKILL.md` for AI agent integration:

```bash
# Skills are located at:
accordo/skill/SKILL.md
kerncap/skill/SKILL.md
linex/skill/SKILL.md
metrix/skill/SKILL.md
nexus/skill/SKILL.md
accordo/skills/accordo-validation/SKILL.md
kerncap/skills/test-kerncap/SKILL.md
linex/skills/linex-profiling/SKILL.md
metrix/skills/metrix-profiling/SKILL.md
nexus/skills/nexus-trace/SKILL.md

# Install skills for AI agents using the install script
./install/skills/install.sh # local: ./.agents/skills/
Expand All @@ -457,6 +457,19 @@ nexus/skill/SKILL.md
./install/skills/install.sh --target github # local: ./.github/agents/skills/ (added in commit 7f8f7ad)
```

### Claude Code marketplace

This repo is also a Claude Code plugin marketplace. The root `.claude-plugin/marketplace.json` exposes each tool as a plugin that bundles its skill (if any) and its MCP server(s):

```bash
# Add the marketplace, then install whichever plugins you need
/plugin marketplace add AMDResearch/intellikit
/plugin install metrix@intellikit
/plugin install rocm-mcp@intellikit
```

Per-plugin manifests live at `<tool>/.claude-plugin/plugin.json` and `<tool>/.mcp.json`. The MCP servers are launched via `uv --directory ${CLAUDE_PLUGIN_ROOT} run <script>`, so users need `uv` plus the tool's native dependencies (ROCm, hipcc, LLVM, etc.) installed.

## Key Design Principles for AI Agents

### LLM-First Design
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,32 @@ curl -sSL https://raw.githubusercontent.com/AMDResearch/intellikit/main/install/

**Clone?** Use `./install/tools/install.sh` and `./install/skills/install.sh`. **Pipe from curl?** Put flags after `bash -s --` (example: `… | bash -s -- --tools metrix,linex`). **`--help`** on either script lists the rest.

**Claude Code users** — see the [Claude Code marketplace](#claude-code-marketplace) section below to install IntelliKit tools as plugins.

---

## Claude Code marketplace

This repo doubles as a [Claude Code plugin marketplace](https://docs.claude.com/en/docs/claude-code/plugins). Add the marketplace once, then install whichever plugins you want:

```bash
# Inside Claude Code
/plugin marketplace add AMDResearch/intellikit
/plugin install <plugin>@intellikit
```

| Plugin | Components | Host requirements |
|--------|------------|-------------------|
| `kerncap` | `test-kerncap` skill + `kerncap` MCP | `uv`; ROCm 7.0+ with `hipcc`, `cmake`, HSA headers (builds `libkerncap.so` via scikit-build-core on first invocation); AMD GPU at runtime |
| `metrix` | `metrix-profiling` skill + `metrix` MCP | `uv`; ROCm with `rocprofv3` on `PATH`; AMD GPU at runtime |
| `linex` | `linex-profiling` skill + `linex` MCP | `uv`; ROCm 7.0+ with `rocprofv3` on `PATH`; AMD GPU at runtime |
| `nexus` | `nexus-trace` skill + `nexus` MCP | `uv`; ROCm with HSA runtime and LLVM (`LLVM_INSTALL_DIR=/opt/rocm/llvm`); AMD GPU at runtime |
| `accordo` | `accordo-validation` skill + `accordo` MCP | `uv`; ROCm toolchain (`hipcc`, `cmake`, `libdwarf-dev`, `libzstd-dev`); AMD GPU at runtime |
| `rocm-mcp` | `hip-compiler`, `hip-docs`, `amd-smi`, `rocminfo` MCPs (no skill) | `uv`; ROCm with `amdsmi` Python bindings (`amd-smi`), `rocminfo` on `PATH`, `hipcc` on `PATH`; network access for `hip-docs` |
| `uprof-mcp` | `uprof-profiler` MCP (no skill) | `uv`; AMD uProf on **x86** with `AMDuProfCLI` on `PATH` |

All plugins require [`uv`](https://docs.astral.sh/uv/) on `PATH` — each MCP launches via `uv --directory ${CLAUDE_PLUGIN_ROOT} run <script>` (e.g. `metrix-mcp`, `hip-compiler-mcp`). To drop individual MCPs from a multi-server plugin (e.g. keep only `rocminfo` from `rocm-mcp`), edit the installed plugin's `.mcp.json`.

---

## Requirements
Expand Down
10 changes: 10 additions & 0 deletions accordo/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "accordo",
"description": "Validate GPU kernel correctness by comparing reference and optimized outputs. Bundles the accordo-validation skill and the accordo MCP server.",
"version": "1.0.0",
"author": {
"name": "Muhammad Awad",
"email": "muhaawad@amd.com"
},
"homepage": "https://github.com/AMDResearch/intellikit/tree/main/accordo"
}
13 changes: 13 additions & 0 deletions accordo/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"mcpServers": {
"accordo": {
"command": "uv",
"args": [
"--directory",
"${CLAUDE_PLUGIN_ROOT}",
"run",
"accordo-mcp"
]
}
}
}
12 changes: 11 additions & 1 deletion accordo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ for opt_binary in ["./opt_v1", "./opt_v2", "./opt_v3"]:

The `accordo` entry point exposes JSON on stdout (logging on stderr). Subcommands:

```
```shell
accordo validate \
--kernel-name NAME \
--ref-binary PATH_TO_EXECUTABLE \
Expand All @@ -91,6 +91,7 @@ The CLI passes each flag as a **single executable path** (no embedded spaces or
### `Accordo(binary, kernel_name, **options)`

**Parameters:**

- `binary` (str | list): Binary path to extract kernel signature from
- `kernel_name` (str): Name of the kernel to validate
- `kernel_args` (list[tuple] | None): Manual kernel args as `[(name, type), ...]`. Auto-extracted if None.
Expand All @@ -100,12 +101,14 @@ The CLI passes each flag as a **single executable path** (no embedded spaces or
- `log_level` (str): Logging level (default: `"WARNING"`)

**Methods:**

- `capture_snapshot(binary, timeout_seconds=30, dispatch_id=None)` -> `Snapshot`
- `compare_snapshots(reference, optimized, tolerance=None, *, atol=1e-08, rtol=1e-05, equal_nan=False)` -> `ValidationResult`

### `Snapshot`

**Attributes:**

- `arrays` (list[np.ndarray]): Captured output arrays (first dispatch)
- `dispatch_arrays` (list[list[np.ndarray]] | None): Per-dispatch output arrays
- `execution_time_ms` (float): Execution time
Expand All @@ -114,12 +117,14 @@ The CLI passes each flag as a **single executable path** (no embedded spaces or
### `ValidationResult`

**Attributes:**

- `is_valid` (bool): Whether validation passed
- `num_arrays_validated` (int): Total arrays checked
- `num_mismatches` (int): Failed comparisons
- `mismatches` (list[ArrayMismatch]): Detailed mismatch info

**Methods:**

- `summary()` -> `str`: Human-readable validation summary

## Requirements
Expand All @@ -131,9 +136,14 @@ The CLI passes each flag as a **single executable path** (no embedded spaces or
## Examples

See `examples/` directory for complete examples:

- `01_reduction/` - Basic reduction kernel validation
- `02_template_kernel/` - Template kernel validation

## Use as a Claude Code plugin

Accordo ships as a plugin in the IntelliKit marketplace — see the [Claude Code marketplace](../README.md#claude-code-marketplace) section in the root README for install instructions and host requirements.

## License

MIT License - Copyright (c) 2025 Advanced Micro Devices, Inc.
File renamed without changes.
22 changes: 16 additions & 6 deletions install/skills/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ set -e
INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/AMDResearch/intellikit/main/install/skills/install.sh"
# Env default (--base-url overrides); use args when piping to bash so overrides apply
BASE_URL="${INTELLIKIT_RAW_URL:-https://raw.githubusercontent.com/AMDResearch/intellikit/main}"
TOOLS=(metrix accordo nexus linex kerncap)
# Each entry is "<tool>:<skill-name>" matching the layout <tool>/skills/<skill-name>/SKILL.md.
TOOLS=(
metrix:metrix-profiling
accordo:accordo-validation
nexus:nexus-trace
linex:linex-profiling
kerncap:test-kerncap
)
DRY_RUN=false
GLOBAL=false
TARGET="agents"
Expand Down Expand Up @@ -96,9 +103,11 @@ if [[ "$DRY_RUN" != true ]]; then
mkdir -p "$SKILLS_ROOT"
fi

for tool in "${TOOLS[@]}"; do
url="${BASE_URL}/${tool}/skill/SKILL.md"
dest_dir="${SKILLS_ROOT}/${tool}"
for entry in "${TOOLS[@]}"; do
tool="${entry%%:*}"
skill="${entry##*:}"
url="${BASE_URL}/${tool}/skills/${skill}/SKILL.md"
dest_dir="${SKILLS_ROOT}/${skill}"
dest_file="${dest_dir}/SKILL.md"

if [[ "$DRY_RUN" == true ]]; then
Expand All @@ -118,7 +127,8 @@ done
if [[ "$DRY_RUN" != true ]]; then
echo ""
echo "IntelliKit skills are in ${SKILLS_ROOT}:"
for tool in "${TOOLS[@]}"; do
echo " ${SKILLS_ROOT}/${tool}/SKILL.md"
for entry in "${TOOLS[@]}"; do
skill="${entry##*:}"
echo " ${SKILLS_ROOT}/${skill}/SKILL.md"
done
fi
Loading
Loading