Agent skill · NVIDIA

tilegym-adding-cutile-kernel

Add a new cuTile GPU kernel operator to TileGym. Covers dispatch registration in ops.py, cuTile backend implementation, __init__.py exports, test creation, and benchmark in tests/benchmark. Use when adding, creating, or implementing a new cuTile operator/kernel in TileGym, or when asking how to register a new cuTile op.

What it needs

About 4k tokens when loaded.

What this skill does

Adding a cuTile Kernel to TileGym End-to-end workflow for adding a new operator (e.g., myop) with cuTile backend. Execution Rules MUST follow these rules strictly: 1. Use TodoWrite to create the checklist below BEFORE writing any code 2. Execute steps in order — do NOT skip ahead or combine steps 3. Mark each todo as completed after finishing, inprogress when starting 4. If a step is not applicable (e.g., no cuTile impl), mark it completed with a note, do NOT silently skip 5. Each step MUST result in a file write or explicit skip decision — no silent omissions Instructions MUST copy this checklist to TodoWrite at the start: Step 1: Register dispatch interface File: src/tilegym/ops/ops.py Add a @dispatch function — this is the single entry point for all backends. Key rules: Function body only raises NotImplementedError Include kwargs for backend-specific parameters Reference: See existing ops in src/tilegym/ops/ops.py (e.g., siluandmul, softmax) Step 2: Implement cuTile backend File: src/tilegym/ops/cutile/myop.py The file structure follows this template: Reference: src/tilegym/ops/cutile/siluandmul.py Step 3: Register in init.py (CRITICAL) Missing this step means the cuTile backend implementation never gets loaded. File: src/tilegym/ops/cutile/init.py Add inside if isbackendavailable("cutile"): block (alphabetically): And in the function import section: And add "myop" to all. Step 4: Add tests File: tests/ops/testmyop.py CRITICAL: Always import from tilegym.ops, NEVER from tilegym.ops.cutile.myop. Key patterns: backends = ["cutile"] testop: use setbackend(backend) with try-except, call self.setUp() Reference: tests/ops/testsiluandmul.py Below is the common errors. Step 5: Add benchmark to tests/benchmark File: tests/benchmark/benchmyop.py Key rules from benchmarkrules.md: Call the op via tilegym.ops.myop(a, b, ..., backend=backend) — do not use setbackend. Define ALLBACKENDS (include at least cutile and torch), filter with getsupportedbackends(). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills NVIDIA/tilegym-adding-cutile-kernel

View the source on GitHub

Browse the @skills marketplace