Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计提醒

learn-cute-dsl学习可爱的 DSL

Agent Skill

learn-cute-dsl 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

539

周安装

22

GitHub Stars

公开资料未说明

下载量

172
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:learn-cute-dsl(学习可爱的 DSL)
来源仓库:https://github.com/pepperu96/hyper-mla
仓库路径:skills/learn-cute-dsl
安装命令:
npx skills add https://github.com/pepperu96/hyper-mla --skill learn-cute-dsl
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pepperu96/hyper-mla --skill learn-cute-dsl

简介

learn-cute-dsl 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态进行整理时使用。

  • 适用于前端设计类任务,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从 GitHub 安装,需确认权限范围和维护状态。
  • 使用前建议检查是否会触发联网、命令执行或文件读写操作。
  • 当前维护状态和稳定性需结合仓库活跃度进一步确认。

SKILL.md

Learn CuTe DSL from CUTLASS Examples

A structured workflow for building CuTe Python DSL fluency by reading CUTLASS Blackwell examples, optionally importing them into the project's runtime infrastructure, profiling them, and distilling reusable patterns into the knowledge base.

Example Source

Vast examples live under third_party/cutlass/examples/python/CuTeDSL. Documentation is in docs/cute-dsl/ (CuTe Python DSL) and docs/cutlass-cpp/cute/ (CuTe C++ concepts).

CategoryExamplesSubdirectory
MLA decodemla_decode_fp16.py, mla_decode_fp8.py, mla_helpers.pymla/
Attentionfmha.py, fmha_bwd.py(top-level)
Mixed attentionmixed_input_fmha_decode.py, mixed_input_fmha_prefill_*.pymixed_input_fmha/
GEMM (basic)dense_gemm.py(top-level)
GEMM (pipelined)dense_gemm_software_pipeline.py(top-level)
GEMM (persistent)dense_gemm_persistent.py, dense_gemm_persistent_prefetch.py(top-level)
GEMM (dynamic persistent)dense_gemm_persistent_dynamic.py(top-level)
GEMM tutorialsfp16_gemm_0.py through fp16_gemm_6.pytutorial_gemm/
Block-scaled GEMMdense_blockscaled_gemm_persistent.py, *_prefetch.py, *_amax.py(top-level)
Mixed-input GEMMmixed_input_gemm.py, grouped_mixed_input_gemm.pymixed_input_gemm/
Epiloguescustom_epilogue_dense_gemm.py, activation_custom_epilogue_dense_gemm.pyepilogue/
Reductionreduce.py, rmsnorm.py(top-level)
Dependent launchprogrammatic_dependent_launch.py(top-level)
Mamba2mamba2_ssd.pymamba2_ssd/
Blockwise GEMMblockwise_gemm.py, contiguous_grouped_gemm.pyblockwise_gemm/

Other examples can be provided by the user directly.

Workflow

1. SELECT    -> Pick examples based on learning goals
2. READ      -> Read and annotate, identify CuTe DSL patterns
3. IMPORT    -> (Optional) Wrap in CuteKernel + KernelPlan for profiling
4. PROFILE   -> Profile imported kernels, compare with existing cuTile versions
5. EXTRACT   -> Distill reusable CuTe DSL patterns and anti-patterns
6. DOCUMENT  -> Update knowledge base (docs/knowledge/languages/cute-dsl/)

Step 1: SELECT

Pick examples based on what you need to learn.

Learning goalStart with
CuTe DSL basics (grid, TMA, MMA)tutorial_gemm/fp16_gemm_0.py through fp16_gemm_6.py
Software pipeliningdense_gemm_software_pipeline.py
Persistent kernel structuredense_gemm_persistent.py
Warpgroup specializationdense_gemm_persistent_prefetch.py
TMA pipelining for attentionfmha.py
MLA decode (direct reference)mla/mla_decode_fp16.py + mla/mla_helpers.py
MLA decode with FP8mla/mla_decode_fp8.py
Cluster programmingdense_gemm_persistent_dynamic.py
Custom epiloguesepilogue/custom_epilogue_dense_gemm.py
Dependent kernel launchprogrammatic_dependent_launch.py

Before reading, write down specific questions. Examples:

  • "How does the MLA decode kernel set up TMA descriptors for the KV cache?"
  • "How are warpgroups assigned producer/consumer roles in persistent GEMM?"
  • "What barrier pattern does FMHA use for the K-loop pipeline?"

Step 2: READ

For each selected example, read the full source and annotate these CuTe DSL-specific aspects:

Host side (@cute.jit)

  1. TMA descriptor creation -- which tensors get TMA descriptors, what are the tile shapes?
  2. Grid and cluster dimensions -- how is the grid computed, is clustering used?
  3. Shared memory size -- how is the SMEM budget calculated from pipeline stages and tile shapes?
  4. Launch parameters -- max_register_count, cluster shape, SMEM carveout

Device side (@cute.kernel)

  1. Thread/warp/warpgroup identity -- how are roles assigned?
  2. Pipeline structure -- number of stages, barrier initialization, producer/consumer loops
  3. TMA operations -- cute.copy(tma_desc,...), arrival patterns
  4. MMA operations -- accumulator setup, MMA loop body, epilogue
  5. Synchronization -- cute.barrier_arrive(), cute.barrier_wait(), cute.cluster_barrier_*
  6. Shared memory layout -- allocation, swizzling, partitioning across warpgroups

Pattern checklist

While reading, flag instances of:

  • TMA multi-stage pipeline (how many stages, barrier per stage)
  • Warpgroup specialization (which warpgroups produce, which consume)
  • Persistent kernel main loop (work tile scheduling, exit condition)
  • Online softmax or streaming accumulation
  • Register-level accumulator management
  • Shared memory swizzle patterns
  • Cluster-level communication (distributed shared memory)
  • Epilogue pattern (in-register, through SMEM, or fused)
  • Boundary handling (predication, masking for partial tiles)
  • Pipeline drain (how the last pipeline stages are flushed)

Cross-reference

Check whether patterns already exist in the knowledge base:

  • docs/knowledge/optimizations/ -- shared patterns (e.g., pipeline-driven-low-occupancy)
  • docs/knowledge/languages/cute-dsl/ -- existing CuTe DSL overlays

Note whether the example confirms, refines, or contradicts existing knowledge.


Step 3: IMPORT (Optional)

Import a CUTLASS example into the project to make it runnable through the standard CLI and profiling infrastructure.

When to import

  • You want to profile the example on your hardware
  • You want a starting point for a custom CuTe DSL kernel
  • The example covers a workload comparable to existing cuTile kernels (e.g., MLA decode)

When NOT to import

  • You only need to understand the pattern, not benchmark it
  • The example has complex dependencies or helper infrastructure that doesn't map cleanly

Import procedure

  1. Create the kernel package: src/mla_var3/kernel/cute_python/<layer>/<design>/<design>/ Example for CUTLASS MLA decode FP16: src/mla_var3/kernel/cute_python/mla/cutlass_mla_decode/cutlass_mla_decode/
  2. Create the KernelPlan subclass (cutlass_mla_decode.py):

- prepare_inputs() -- allocate tensors matching the example's expected shapes (Q, KV cache, output) - reference_fn() -- PyTorch reference for correctness - _autotune_configs() -- tiling parameters from the example - _algorithmic_flops_bytes() -- roofline analysis - plan() -- return a CuteKernel wrapping the example's host/device functions

  1. Create __main__.py: from.cutlass_mla_decode import CutlassMlaDecodeKernel if __name__ == "__main__": kernel_plan = CutlassMlaDecodeKernel() kernel_plan.benchmark_kernel_argparse()
  2. Create __init__.py at each package level
  3. Handle helper modules: If the example uses helpers (e.g., mla_helpers.py), either:

- Copy into the kernel package and adjust imports - Import from the CUTLASS path (fragile but faster for exploration)

  1. Test correctness: source.venv/bin/activate && python -m mla_var3.kernel cutlass_mla_decode --prof_type=disabled --check

Step 4: PROFILE

Architecture compatibility check

Before profiling, verify the available device matches the kernel's target architecture:

nvidia-smi --query-gpu=name --format=csv,noheader

Many CUTLASS examples (especially those in mla/, and any using tcgen05 MMA ops) target SM100 (B200, B300 datacenter GPUs) specifically. Be aware that "Blackwell" is a marketing name spanning multiple SM versions with different instruction sets:

  • SM100 (B200, B300) — datacenter GPUs, supports tcgen05 MMA, TMEM, full cluster features
  • SM120 (GeForce RTX 5090, RTX 5080) — consumer Blackwell, uses sm_120a, does not support tcgen05 ops

A kernel using tcgen05 ops will not run on an RTX 5090 (SM120) despite both being marketed as "Blackwell". Match the GPU name to its actual SM version, not the marketing generation.

If the kernel's target SM version does not match the available device, skip the PROFILE step entirely — execution will either fail at compile time or produce misleading results. In that case, proceed directly to Step 5 (EXTRACT) with insights from reading the source code only, and note the architecture mismatch in any documentation.

Profiling sequence

  1. Lock GPU clocks: bash scripts/lock-gpu-clock.sh
  2. Annotation mode first: source.venv/bin/activate && python -m mla_var3.kernel <kernel> \ --b=32 --s=1 --t=4096 --prof_type=annotation
  3. NCU deep dive if annotation reveals interesting patterns: source.venv/bin/activate && python -m mla_var3.kernel <kernel> \ --b=32 --s=1 --t=4096 --prof_type=ncu

Focus areas

Since the goal is learning (not just benchmarking), focus on understanding how the kernel achieves its performance:

  • Pipeline efficiency: Are TMA copies fully overlapped with compute? Check for idle bubbles in the nsys timeline.
  • Warpgroup utilization: Are all warpgroups busy? Check scheduler statistics in NCU.
  • Register pressure vs occupancy tradeoff: How many registers per thread? Is low occupancy intentional?
  • SMEM usage: How much of the available SMEM budget is used? How many pipeline stages fit?
  • MMA throughput: What fraction of peak TC utilization is achieved?

Compare with cuTile versions

If the imported kernel covers a workload that exists in cuTile (e.g., MLA decode), compare:

MetriccuTile versionCUTLASS CuTe DSLDeltaInsight
Duration (us)
TC%
DRAM%
Occupancy
Registers/thread
SMEM/block (KB)

Differences reveal what explicit control (warpgroup scheduling, TMA pipelining) buys over cuTile's block-level abstraction.


Step 5: EXTRACT

Distill observations into reusable CuTe DSL patterns.

Classification

TypeDestination
Shared algorithmic/hardware patterndocs/knowledge/optimizations/<name>.md
Shared failure modedocs/knowledge/anti-patterns/<name>.md
CuTe DSL API pattern or implementation detaildocs/knowledge/languages/cute-dsl/optimizations/<name>.md
CuTe DSL trap or pitfalldocs/knowledge/languages/cute-dsl/anti-patterns/<name>.md

Most patterns from CUTLASS examples will be CuTe DSL-specific (the API patterns, TMA setup idioms, barrier choreography). Shared patterns (algorithmic insights like pipeline-driven scheduling) may already exist from cuTile work.

Extraction criteria

Document a pattern if it:

  • Transfers to other CuTe DSL kernels (not just this one example)
  • Is non-obvious from the CuTe DSL documentation alone
  • Has performance implications visible in profiling or architecturally clear
  • Refines an existing shared pattern with CuTe DSL-specific implementation details

Pattern template

# [Pattern Name]

## When to Apply
- [CuTe DSL kernel type, workload shape, bottleneck condition]

## Mechanism
[How the pattern works in CuTe DSL -- reference specific APIs]

## Affected Metrics
- [Metric 1]
- [Metric 2]

## Implementation

CuTe DSL code snippet, generalized from the CUTLASS example


## Source

[CUTLASS example name and path]

## Performance Evidence

Source: [example name, device, configuration]

| Config | Metric | Value | Context |
| --- | --- | --- | --- |

## Generalization

[Device-agnostic takeaway]

## Pitfalls

- [CuTe DSL-specific failure modes]

## Interactions

- [How this interacts with other CuTe DSL patterns]

Step 6: DOCUMENT

  1. Write pattern files to docs/knowledge/languages/cute-dsl/optimizations/ or anti-patterns/
  2. Update the index in /optimization-catalog-cute-dsl
  3. If a pattern is shared (not DSL-specific), write to docs/knowledge/optimizations/ and update /optimization-catalog
  4. If you imported and profiled a kernel, write a devlog entry in docs/kernels/:
# [Kernel Name] (Imported from CUTLASS)

## Overview
[What this kernel does and why it was imported for study]

## Source
Original: `third_party/cutlass/examples/python/CuTeDSL/<path>`
Imported: `src/mla_var3/kernel/cute_python/mla/<design>/`

## Performance
[Profiling results table]

## Patterns Extracted
- [Pattern] -> `docs/knowledge/languages/cute-dsl/optimizations/<name>.md`

## Insights
[What was learned that informs future CuTe DSL kernel design]

Recommended Learning Paths

Path A: CuTe DSL fundamentals

For building basic fluency before writing any MLA kernel:

1. tutorial_gemm/fp16_gemm_0.py  -> Minimal kernel: grid, TMA load, MMA, store
2. tutorial_gemm/fp16_gemm_3.py  -> Software pipelining basics
3. tutorial_gemm/fp16_gemm_6.py  -> Full persistent GEMM with warpgroup specialization
4. dense_gemm_software_pipeline.py -> Production-quality pipelining
5. dense_gemm_persistent.py      -> Persistent scheduling pattern

Path B: MLA-specific patterns

For directly studying how CUTLASS implements MLA:

1. mla/mla_helpers.py            -> Shared utilities, tensor layouts, TMA setup
2. mla/mla_decode_fp16.py        -> FP16 MLA decode with full pipeline
3. mla/mla_decode_fp8.py         -> FP8 variant (quantization handling)
4. fmha.py                       -> Attention forward (different design choices)

Path C: Advanced patterns

For specific optimization techniques:

1. dense_gemm_persistent_prefetch.py  -> Prefetching in persistent kernels
2. dense_gemm_persistent_dynamic.py   -> Dynamic tile scheduling + clusters
3. epilogue/custom_epilogue_dense_gemm.py -> Fused epilogue patterns
4. programmatic_dependent_launch.py   -> Dependent kernel launch

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.9%
按下载量换算58

Claude

31.07%
按下载量换算53

Cursor

18.01%
按下载量换算31

Gemini CLI

7.95%
按下载量换算14

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills