All authors

Claude Skills by AMD-AGI
github.com/AMD-AGI35 skills0 installs172 views
- RooflineTurn the standardized Top-N into a per-kernel answer to: **"how much of this hardware's ceiling is this kernel already getting, and therefore how much is left to win?"** You (an agent) can execute this skill by reading this file. `roofline_tools.py` next to it holds mechanical primitives (peak-table parsing, counter parsing, unit math) — use them if they import, do the arithmetic yourself if they don't. **A broken helper must not disable this skill; a broken skill must not fail the run.** ---Votes: 0GitHub stars: 215
- ContributeContribute a human-authored, e2e-validated optimization playbook (an "expert skill") to GEAK — scaffold, fill, validate by scope, and open a PR.Votes: 0GitHub stars: 215
- Apply Flydsl Moe To Vllmvllm serve <model> -tp 4 --gpu-memory-utilization 0.9 \ --trust-remote-code --tool-call-parser kimi_k2 --enable-auto-tool-choice \ --reasoning-parser kimi_k2 --no-enable-prefix-caching --mm-encoder-tp-mode data ``` 4. **Verify startup (in order, no error)**: weight load → (silent in-place convert) → `Available KV cache` (no OOM) → `[flydsl-precompile] BEGIN exhaustive eager warmup ...` → `[flydsl-precompile] DONE eager warmup (N/N); all FlyDSL exes compiled+cached outside capture` (from step ...Votes: 0GitHub stars: 215
- Ensure FlydslThis skill makes `import flydsl, kernels.moe_gemm_2stage` resolve from ONE consistent tree, so the FlyDSL optimization skills (`flydsl_rewrite_quantized_moe` for authoring, `apply_flydsl_moe_to_vllm` for the e2e apply-back) can run. It is a **dependency skill**: other skills / the System Architect invoke it; it is not selected from the profile Top-N on its own.Votes: 0GitHub stars: 215
- Flydsl Decode Moe Stage1 BlkmapTrigger on the **problem signature, not a specific model**: a **grouped-GEMM MoE stage-1 (gate+up)** kernel at **decode / small-M** where repeated expert-weight HBM traffic is a **material** part of latency (the baseline may be mixed rather than purely memory-bound), the MoE token-sort pads each expert to a fixed sort-block granularity `B` (commonly 64 rows), and routing gives many experts **>=2 sort-blocks**. A per-sort-block compute tile then re-reads the same low-precision expert weight once Votes: 0GitHub stars: 215
- Flydsl Fp8 Blockscale GemmTrigger on the **problem signature, not a specific shape**: *any* **CK a8w8 fp8 block-scale** dense GEMM (`weight_block_size [128,128]`, arbitrary fp32 per-`[128,128]` block scales, bf16 out; the profiled hotspot name matches `kernel_gemm_xdl*blockscale` / `gemm_a8w8_blockscale`) being rewritten **CK → FlyDSL** on **MI355X / gfx950 (CDNA4, OCP fp8_e4m3)**, where the FlyDSL **native** fp8 scaled-MFMA path fails parity against the CK oracle (the symptom that blocks the port) and CK config-JSON / tVotes: 0GitHub stars: 215
- Flydsl Fp8 Gemm PlaybookAn fp8 **a8w8 block-scale** model (weight_block_size [128,128]) on MI300X where a dense GEMM head is the top GPU-time mass and the per-(N,K) Triton config-JSON overlay is already exhausted (config tiling gives only ~1.04–1.06x). Specifically the **K-heavy / narrow-N down-proj** (e.g. N=5120, K=17408, ~18% GPU on Qwen3.5-27B-FP8): config tuning is near its ceiling, so the remaining lever is a **code-level authored core**, not more config JSON.Votes: 0GitHub stars: 215
- Flydsl Fused Attention BackwardAn attention **backward** kernel is a top GPU-time entry in a training or fine-tuning run and the live path is a poor fit for the shape. The two situations that make authoring worthwhile:Votes: 0GitHub stars: 215
- Flydsl Prefill Moe Stage2 Fp8partialTrigger on the **problem signature, not a specific model**: a **grouped-GEMM MoE stage-2 (down-proj + top-k reduce)** at **prefill / large-M** on gfx950 that is **HBM-traffic-bound on the per-(token, top-k slot) partial tensor**. Down-proj writes `top_k` partial rows per token and the reduce sums them, so that partial is the largest stage-2 HBM stream — written once and read once. Applies where the down path runs the **non-accumulating** variant (each expert-slot's partial stored standalone, theVotes: 0GitHub stars: 215
- Flydsl Rewrite Quantized MoeA hot kernel that is an **int4 (W4A16 GPTQ/AWQ) or fp8 (blockscale) quantized GEMM / fused-MoE grouped GEMM** on MI300X (gfx942), where the live path is a Triton `@triton.jit` body (or a closed `.co`) and Triton body micro-opts have hit their ceiling. The Triton int4-unpack loop is latency-bound at ~15–20% HBM, so body-only tuning caps at ~1.1×; a full **FlyDSL rewrite** of the candidate reaches ~60–65% HBM at decode and ~3.6–6.2× over the Triton golden (speedup grows with M). This is the lever Votes: 0GitHub stars: 215
- Gluon AuthoringThe workflow is working a **Gluon** kernel on gfx942/gfx950 and needs two things this file supplies: the **Gluon API surface**, and the **do-not-write list** — the constructs and instruction choices that compile and then silently cost you.Votes: 0GitHub stars: 215
- Mla Tilelang To TritonThe MLA (multi-head latent attention) **decode** path is the bottleneck on a DeepSeek-class model on MI300X (gfx942) and the live implementation is a TileLang kernel. Port it to Triton to (a) get an editable, CUDA-graph-capturable core the workflow can further tune, and (b) close the gap to the hand-tuned aiter/asm path while staying author-friendly.Votes: 0GitHub stars: 215
- Env SetupGet a container ready to tune GPU ops on AMD Instinct — audit which tuning tools are present, install the missing bench clients (hipblaslt-bench, ckProfiler, aiter tuners) at versions that match the runtime, and avoid the version-skew failures that silently produce useless tuned artifacts. Use before any tuning run in a vllm or sglang image.Votes: 0GitHub stars: 215
- Tuning AiterTune GEMM and fused ops through aiter on AMD Instinct — run the gradlib tuner across hipblaslt/triton/flydsl/asm/torch backends, write tuned config CSVs to the directory the runtime actually reads, and prove engagement with AITER_LOG_TUNED_CONFIG. Use when tuning ops dispatched through aiter in vLLM or SGLang.Votes: 0GitHub stars: 215
- Tuning CkTune GEMMs on the Composable Kernel path — race CK's compiled instances with ckProfiler, read the instance name to understand why one won, and route the result into a framework through aiter's per-op CK tuners. Use when the op dispatches through CK or when establishing what a CK path could reach.Votes: 0GitHub stars: 215
- Tuning CoreThe universal loop for tuning GEMM and other GPU ops on AMD Instinct — scope the search space, measure honestly, gate on correctness, and prove the tuned artifact actually engaged. Start here before any language- or framework-specific tuning skill.Votes: 0GitHub stars: 215
- Tuning FlydslTune FlyDSL kernels on AMD Instinct — build and prune a Config space, set the autotune key, and race FlyDSL against the other backends through aiter's libtype mechanism. Use when the kernel is written in FlyDSL or when deciding whether the FlyDSL path is competitive for a shape.Votes: 0GitHub stars: 215
- Tuning HipTune hand-written HIP kernels on AMD Instinct — choose launch geometry against the wave64/CU/LDS limits of the target, use rocprofv3 to get ground-truth kernel timings and occupancy, and confirm which kernel actually ran. Also the profiler reference for verifying engagement on any backend.Votes: 0GitHub stars: 215
- Tuning HipblasltTune GEMMs on the hipBLASLt path — capture the exact problem from a live workload, race all solutions with hipblaslt-bench, replay the winner by solution index, and avoid the bracket-number and hot-cache traps. Use when the op dispatches through hipBLASLt (torch matmul, aiter libtype=hipblaslt).Votes: 0GitHub stars: 215
- Tuning In SglangTune ops inside an SGLang serving deployment on AMD Instinct — capture real shapes, tune the Triton fused-MoE path into the correct triton_<version> config directory, deploy via SGLANG_MOE_CONFIG_DIR, and read the server log to distinguish an exact config hit from a silently degraded version fallback. Use when tuning for a live SGLang workload.Votes: 0GitHub stars: 215
- Tuning In VllmTune ops inside a vLLM serving deployment on AMD Instinct — capture the shapes the model actually issues, tune fused-MoE and GEMM paths, deploy configs where vLLM reads them via VLLM_TUNED_CONFIG_FOLDER, and confirm from the server log that the tuned config was loaded. Use when tuning for a live vLLM workload.Votes: 0GitHub stars: 215
- Tuning TritonTune Triton and Gluon GPU kernels on AMD Instinct — build a config space including the AMD-only knobs (waves_per_eu, matrix_instr_nonkdim, kpack), prune it before racing, set the autotune key correctly, and confirm the win exceeds the noise floor. Use when the kernel you are tuning is written in Triton or Gluon.Votes: 0GitHub stars: 215
- Run ReportBuild or read the report for a GEAK run — one self-contained page (report/geak_run_report_<model>.html) with every LLM API call's cost, tokens, billed time and elapsed time, arranged by phase, by workflow invocation and as a role tree of agents. Use when asked where a run's time or money went, which phase or agent dominates it, or which work is cheap enough to delegate to a smaller model.Votes: 0GitHub stars: 215
- Kernel ProfileProfile one AgentX serving deployment's GPU kernels from its measured baseline -- observed workload, bounded trace sampling, census, ranking and target selection -- and deliver profile_handoff.json for kernel-ut. Excludes task boundaries, UT authoring and optimization.Votes: 0GitHub stars: 215
- Kernel UtBuild and qualify standalone GPU kernel UTs from a kernel-profile handoff -- declare task boundaries, extract actual kernel source, author seeded-input UTs and qualify their correctness, then deliver them for optimization. Correctness only; timing belongs to optimization. Never profiles or captures numerical oracles.Votes: 0GitHub stars: 215
- Multinode TracesCheck and combine the traces of a finished multi-node (tp_span or pd_disagg) serving leg -- gate the per-rank trace set, plan PD sampling points, weigh the two PD engines by GPU-time mass, merge their Top-Ns and workloads. Reads files and writes reports only; no cluster, no ssh, no pin. Use from the multinode role fragments; not for single-node runs.Votes: 0GitHub stars: 215
- RoutingGEAK's default routing policy on expt/3-routing — send every agent to the lowest sufficient Claude model (Haiku 4.5 → Sonnet 5.5 → Opus 5.5), climb only on deterministic failure, cap spend in code, and report every dollar. Use when running, reviewing or tuning a routed GEAK run, or when asked where a routed run over- or under-spent.Votes: 0GitHub stars: 215
- Moe BottleneckFramework status: **READY**. A workload analysis remains `awaiting_measurement` until its evidence contract is complete.Votes: 0GitHub stars: 215
- Apply Mono Kernel To FrameworkApplicability test. All three lines must be true, and each is something you can observe: 1. You are an **e2e role** (routing or integration) working against a live vLLM or SGLang server. You are **not** inside a kernel lane: your work item is not a task directory whose `unittest.py` oracle you must beat. 2. A **mono kernel already exists** for the layer kind to replace (one persistent kernel per rank that computes a whole decoder layer for a decode step, with the tensor-parallel all-reduceVotes: 0GitHub stars: 215
- Flydsl Decode Op Authoring**Applicability test** (all three must hold; judge by what the kernel computes, not by `op_kind` or `regime` strings):Votes: 0GitHub stars: 215
- Megamoe Ep Mega FusionThe validated evidence covers MegaMoE V2 on one EP8 gfx950 node and the complete two-launch persistent target. In that target quantization remains a separate launch; dispatch, GEMM1, GEMM2, P2P publication and Combine execute in one persistent grid.Votes: 0GitHub stars: 215
- Megamoe Small Mtpr FusionOne measured solution for the **weight-streaming regime** of MegaMoE V2: an EP8 gfx950 node, `max_tok_per_rank` (mtpr) of the operator about 32–128, all 48 local experts active, so the floor is reading every expert weight once (≈1.68 GB per rank, ≈244 µs at the measured 6.9 TB/s HBM read ceiling). Measured at tokens = mtpr = 64: frozen baseline 0.3458 ms (4 launches: quantize, stage1 dispatch+GEMM1, stage2 GEMM2, combine) → **0.2946 ms (1.174x, official bench median)**, graph time ≈291 µs, one lVotes: 0GitHub stars: 215
- Mono Kernel Authoring**Applicability test** (all three must be true):Votes: 0GitHub stars: 215
- Mono Kernel OptimizeApplicability test — all three lines must be true, judged from the task directory, not from metadata: 1. The device kernel under test computes a **whole decoder layer for one decode step** (norm, attention and FFN / MoE stages, or everything from the attention output on) as one persistent launch per rank, or a small fixed number of launches, with the tensor-parallel all-reduce **inside** the kernel. 2. The task's `unittest.py` starts **more than one rank** (one process per GPU) and needs sVotes: 0GitHub stars: 215
- Native Decode NumericsApplicability test. All three lines must be true; each can be checked in the task directory:Votes: 0GitHub stars: 215