Token导航 LogoToken导航

Agent Skill · 前端设计

cute-dsl-ref(可爱的 DSL 参考)

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

cute-dsl-ref 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 6,283。

总安装 533周安装 22GitHub Stars 公开资料未说明下载 174核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

NVIDIA CuTe Python DSL 布局代数的官方参考手册,涵盖线程级控制原语。暴露显式的 thread/warp/warpgroup 控制、TMA 传输流水线和共享内存管理接口。采用 host/device 双函数模式:CPU 端设置描述符,GPU 端执行实际计算内核。

适用于需要精细控制内存布局和通信模式的深度学习算子开发场景。cute-dsl-ref 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/cute-dsl-ref

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/pepperu96/hyper-mla --skill cute-dsl-ref;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cute-dsl-ref 怎么安装?

在终端执行 npx skills add https://github.com/pepperu96/hyper-mla --skill cute-dsl-ref。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cute-dsl-ref 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cute-dsl-ref 需要什么权限?

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

cute-dsl-ref 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cute-dsl-ref 用的人多吗?

公开数据是累计安装 533 次,近一周安装 22 次,下载 174 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cute-dsl-ref 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
cute-dsl-ref

可爱的 DSL 参考 · 本页

533—需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

CuTe Python DSL Reference

Execution Model

CuTe Python DSL is the Python surface for NVIDIA's CuTe layout algebra. Unlike cuTile's block-level abstraction, CuTe DSL exposes explicit thread/warp/warpgroup control, TMA pipelines, barrier choreography, and shared memory management.

Two-Level Host/Device Pattern

Every CuTe DSL kernel has two functions:

  1. @cute.jit host function — runs on CPU, sets up TMA descriptors, computes grid, allocates shared memory, launches the kernel
  2. @cute.kernel device function — runs on GPU, contains the actual computation
import cutlass
import cutlass.cute as cute

@cute.kernel
def my_kernel(tiled_mma: cute.TiledMma, ...):
    tidx, _, _ = cute.arch.thread_idx()
    bidx, bidy, _ = cute.arch.block_idx()
    # ... GPU code

@cute.jit
def host_fn(a: cute.Tensor, b: cute.Tensor, c: cute.Tensor):
    # Setup TMA descriptors, compute grid, allocate SMEM
    my_kernel(...).launch(grid=grid_shape, block=block_shape, smem=smem_bytes)

Compilation Pipeline

Three-stage JIT compilation:

  1. Pre-Staging: Python AST rewriting
  2. Meta-Stage: Python interpreter executes meta-programs (compile-time constants resolved)
  3. Object-Stage: Compiler backend generates PTX → SASS

JIT artifacts are cached automatically. Control with CUTE_DSL_CACHE_DIR and CUTE_DSL_DISABLE_FILE_CACHING.

Key Difference from cuTile

AspectcuTileCuTe DSL
Abstraction levelBlock-level (no thread identity)Thread/warp/warpgroup level
TMAImplicit (allow_tma=True)Explicit descriptor setup in host
Shared memoryCompiler-managedExplicit allocation and layout
SynchronizationNone exposedBarriers, arrive/wait, named barriers
PipelineNone exposedExplicit multi-stage async pipelines
MMAct.mma(A, B, C) on tilescute.gemm(tiled_mma, d, a, b, c) on partitioned fragments
CompilationcuTile bytecode → MLIRCuTe DSL JIT → PTX → SASS

Core API Table

Decorators and Compilation

APIPurposeKey params
@cute.kernelDevice kernel decoratorfunction name must match module filename
@cute.jitHost JIT function decorator—
kernel(...).launch(grid, block, smem, cluster)Launch kernelgrid=(x,y,z), block=(threads,1,1), smem=bytes, cluster=(cx,cy,cz)
cute.compile(fn, *args, options="...")Ahead-of-time compile"opt-level=3", "keep-ptx", etc.

Thread/Block/Grid Indexing

APIPurpose
cute.arch.thread_idx()Returns (tidx, tidy, tidz)
cute.arch.block_idx()Returns (bidx, bidy, bidz)
cute.arch.block_dim()Block dimensions
cute.arch.grid_dim()Grid dimensions
cute.arch.warp_idx()Warp index within block
cute.arch.block_idx_in_cluster()Block index within cluster (Hopper+)

Layout and Tensor Construction

APIPurposeNotes
cute.make_layout(shape, stride)Create layoutCore abstraction: maps coordinates → indices
cute.make_ordered_layout(shape, order)Create with stride ordere.g., order=(1,0) for column-major
cute.make_identity_layout(shape)Identity layoutFor predication
cute.make_tensor(ptr, layout)Create tensor viewPairs pointer + layout
cute.make_fragment(layout, dtype)Allocate register tensorFor accumulators
cute.make_fragment_like(src, dtype)Register tensor matching source—
cute.make_ptr(dtype, addr, memspace)Tagged pointercute.AddressSpace.smem/gmem
cute.from_dlpack(tensor)Convert PyTorch/JAX tensorReturns cute.Tensor with .mark_layout_dynamic()

Layout Algebra

APIPurpose
cute.size(t, mode=None)Total size or modal size
cute.shape(t)Get shape tuple
cute.stride(t)Get stride tuple
cute.rank(t)Number of modes
cute.local_tile(tensor, tiler, coord, proj)Extract block's tile
cute.logical_divide(tensor, divisor)Divide into tile + rest
cute.composition(layout1, layout2)Compose layouts
cute.complement(layout)Complement layout
cute.coalesce(layout)Simplify layout
cute.flatten(t)Flatten tensor/layout
cute.group_modes(layout, start, end)Group modes together
cute.tile_to_shape(tile, shape)Tile to target shape
cute.ceil_div(a, b)Ceiling division

MMA Operations

APIPurposeNotes
cute.make_tiled_mma(op)Create tiled MMA from operatione.g., tcgen05.MmaF16BF16Op(...)
tiled_mma.get_slice(thread_idx)Get thread's partitionReturns ThrMma
thr_mma.partition_A(tensor)Partition A operandThread-level view
thr_mma.partition_B(tensor)Partition B operandThread-level view
thr_mma.partition_C(tensor)Partition C operandThread-level view
tiled_mma.partition_shape_C(shape)Shape of C partitionFor fragment allocation
tiled_mma.make_fragment_A(tensor)Make A fragmentRegister allocation
tiled_mma.make_fragment_B(tensor)Make B fragmentRegister allocation
tiled_mma.make_fragment_C(shape)Make C fragmentRegister allocation
cute.gemm(tiled_mma, d, a, b, c)Execute MMA: d = a @ b + cDispatches to hardware MMA

Copy and TMA Operations

APIPurposeNotes
cute.make_tiled_copy(atom)Create tiled copyFor bulk data movement
cute.copy(atom, src, dst, **kw)Execute copytma_bar_ptr=, mcast_mask=
cute.basic_copy(src, dst)Element-wise copyNo atom needed
cute.prefetch(atom, src)Prefetch TMA descriptor—
cute.nvgpu.make_tiled_tma_atom_A(op, tensor, smem_layout, tile, mma)Create TMA atom for AHost-side only
cute.nvgpu.make_tiled_tma_atom_B(op, tensor, smem_layout, tile, mma)Create TMA atom for BHost-side only

Shared Memory

APIPurpose
cutlass.utils.SmemAllocator()Create SMEM allocator
smem.allocate_tensor(dtype, layout, align, swizzle)Allocate tensor in SMEM
smem.allocate(struct_type)Allocate struct in SMEM

Tensor Memory (SM100 only)

APIPurpose
cutlass.utils.TmemAllocator(...)Create TMEM allocator
tmem.allocate(num_cols)Allocate columns
tmem.wait_for_alloc()Wait for allocation
tmem.retrieve_ptr(dtype)Get pointer
tmem.free(ptr)Free memory

Synchronization

APIPurpose
cute.arch.mbar.init(barrier_ptr, count)Initialize barrier
cute.arch.mbar.arrive(barrier_ptr)Arrive at barrier
cute.arch.mbar.wait(barrier_ptr, phase)Wait at barrier
cute.arch.mbar.arrive_and_expect_tx(barrier_ptr, bytes)Arrive with expected TX bytes
cute.arch.mbar.try_wait(barrier_ptr, phase)Non-blocking wait
Pipeline classes (see references)Multi-stage async pipelines

Math (Element-wise on TensorSSA)

APIPurposeAPIPurpose
cute.exp(x)e^xcute.exp2(x)2^x
cute.log(x)ln(x)cute.log2(x)log2(x)
cute.sqrt(x)sqrtcute.rsqrt(x)1/sqrt(x)
cute.sin(x)sincute.cos(x)cos
cute.tanh(x)tanhcute.erf(x)erf

All math functions accept fastmath=True for approximate hardware intrinsics.

Tensor Operations

APIPurpose
cute.full(shape, val, dtype)Fill with value
cute.zeros_like(tensor)Zero tensor matching shape
cute.where(cond, x, y)Conditional select
cute.any_(tensor)Logical any
cute.all_(tensor)Logical all

Debugging

APIPurpose
cute.printf(fmt,...)Device-side printf
cute.print_tensor(tensor)Print tensor contents
print(...)Compile-time print (meta-stage only)

Key Constraints

  1. @cute.kernel function name must match module filename — same rule as cuTile
  2. TMA descriptors are host-side only — create in @cute.jit, pass to @cute.kernel
  3. Register budget: 255 max/thread — validate with docs/devices/ specs
  4. SMEM limits vary by device and SM version — SM100 (B200/B300): 228 KB/SM, 227 KB/block opt-in; SM120 (RTX 5090): 96 KB
  5. Pipeline stages consume SMEM — each stage needs its own buffer; validate total
  6. Barrier sync errors are silent — cause incorrect results, not crashes; always test with --check
  7. Cluster dimensions must be compatible with grid — cluster shape must evenly divide grid
  8. print() is compile-time only — use cute.printf() for device-side output
  9. No early-exit breaks in loops — use predication instead
  10. 32-bit layout algebra — shapes/strides limited to 32-bit integers
  11. Architecture support: Ampere (SM80) and above; SM100 (B200/B300) for full features including tcgen05 and TMEM
  12. Architecture-specific kernels: Some kernels target a specific SM version (e.g., tcgen05 MMA ops require SM100, not just "Blackwell"). The "Blackwell" marketing name spans multiple SM versions with different instruction sets: Always check the device before running, compiling, or profiling: nvidia-smi --query-gpu=name --format=csv,noheader. Then match against the kernel's target SM version — the GPU name alone is not sufficient; you must know which SM version it maps to. If the SM version does not match, skip the run/profiling step rather than attempting execution that will fail or produce misleading results.

- 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

Control Flow

ConstructBehaviorNotes
for i in range(N)Unrolled if N is staticStandard Python range
for i in cutlass.range(N)Runtime loopGenerates MLIR loop
for i in cutlass.range_constexpr(N)Compile-time unrollN must be static
if cutlass.const_expr(cond)Compile-time branchEliminated at compile time
if condRuntime branchBoth branches must type-check

Blackwell Datacenter MMA Operations (tcgen05) — SM100 only

SM100 required. tcgen05 ops are available on B200/B300 (SM100) only. They are not available on consumer Blackwell GPUs like RTX 5090 (SM120/sm_120a).
from cutlass.cute.nvgpu import tcgen05

# Create MMA operation for SM100 (B200/B300) tensor cores
op = tcgen05.MmaF16BF16Op(
    dtype=cutlass.Float16,           # Input type
    acc_dtype=cutlass.Float32,       # Accumulator type
    shape=(128, 128, 64),            # M x N x K tile shape
    cta_group=tcgen05.CtaGroup.ONE,  # ONE or TWO CTAs
)

tiled_mma = cute.make_tiled_mma(op)
OperationInput typesShapes
MmaF16BF16OpFP16/BF16 → FP32Various M×N×K
MmaF8F6F4OpFP8/FP6/FP4 → FP32Narrow precision
Block-scaled variantsWith scale factorsSee examples

Common Patterns

GEMM with TMA Pipeline (Simplified)

@cute.kernel
def gemm_kernel(tiled_mma, tma_a, tma_b, smem_a, smem_b, gmem_c, ...):
    tidx, _, _ = cute.arch.thread_idx()
    bidx, bidy, _ = cute.arch.block_idx()

    # Get thread's MMA partition
    thr_mma = tiled_mma.get_slice(tidx)

    # Allocate accumulator in registers
    acc = tiled_mma.partition_shape_C(tile_shape)
    tCrC = cute.make_fragment(acc, cutlass.Float32)

    # K-loop with TMA pipeline
    for k_tile in range(num_k_tiles):
        # TMA copy: global → shared (async)
        cute.copy(tma_a, gA_tile, sA_tile, tma_bar_ptr=barrier)
        cute.copy(tma_b, gB_tile, sB_tile, tma_bar_ptr=barrier)

        # Wait for TMA to complete
        cute.arch.mbar.wait(barrier, phase)

        # Partition shared memory for this thread
        tCsA = thr_mma.partition_A(sA)
        tCsB = thr_mma.partition_B(sB)

        # MMA: accumulate into registers
        cute.gemm(tiled_mma, tCrC, tCsA, tCsB, tCrC)

    # Epilogue: write back to global memory
    cute.basic_copy(tCrC, gC_partition)

Warpgroup Specialization (Producer/Consumer)

warp_idx = cute.arch.warp_idx()
is_producer = warp_idx < num_producer_warps

if is_producer:
    # Issue TMA copies for upcoming pipeline stages
    for stage in range(num_stages):
        cute.copy(tma_atom, src, dst, tma_bar_ptr=barriers[stage])
        cute.arch.mbar.arrive_and_expect_tx(barriers[stage], bytes_per_stage)
else:
    # Consume data from shared memory, execute MMA
    for stage in range(num_stages):
        cute.arch.mbar.wait(barriers[stage], phase)
        cute.gemm(tiled_mma, acc, sA_stage, sB_stage, acc)

Persistent Kernel Loop

@cute.kernel
def persistent_kernel(tiled_mma, num_tiles, ...):
    bidx, _, _ = cute.arch.block_idx()
    num_blocks = cute.arch.grid_dim()[0]

    tile_id = bidx
    while tile_id < num_tiles:
        # Process tile
        # ... TMA copy, MMA, epilogue ...
        tile_id += num_blocks

Detailed References

平台分布

Codex

36.07%
按下载量换算63

Claude

27.62%
按下载量换算48

Cursor

18.5%
按下载量换算32

Gemini CLI

8.39%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills