tilegym-converting-cutile-triton-to-cutile-rs

Convert Triton-TileIR and cuTile-Python GPU kernels to cutile-rs Rust via a multi-agent pipeline.

807|85|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/NVIDIA/TileGym --skill tilegym-converting-cutile-triton-to-cutile-rs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilegym-converting-cutile-triton-to-cutile-rs
Source: https://github.com/NVIDIA/TileGym/tree/main/skills/tilegym-converting-cutile-triton-to-cutile-rs
Command: npx skills add https://github.com/NVIDIA/TileGym --skill tilegym-converting-cutile-triton-to-cutile-rs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Porting tile-based GPU kernels from Triton-TileIR or cuTile-Python to cutile-rs (Rust) requires coordinating IR dumping, device kernel authoring, FFI host wiring, correctness testing, and performance benchmarking, which is error-prone when done ad hoc.

Core Features & Use Cases

  • Bounded multi-agent pipeline: Orchestrates Agents A through F with a strict routing table, spawn caps, and verdict-based handoffs covering IR analysis, kernel conversion, host FFI, correctness, and performance stages.
  • Deterministic validation scripts: Ships preflight, IR validation, per-agent validators, IR diffing, and a final 17-file aggregate kernel gate.
  • Worked examples and references: Includes softmax (raw-pointer launch) and bmm (tiled-output launch) templates plus coding rules, op mapping, and IR diff checklists.
  • Use Case: A developer adding a cutile-rs backend to a TileGym operator runs the pipeline to produce kernel.rs, ffi.rs, a Python wrapper, backend registration, and CUPTI-backed correctness and performance reports.

Quick Start

Ask the agent to convert a TileGym kernel such as softmax to a cutile-rs backend and let the skill run its preflight and agent pipeline automatically.

Frequently Asked Questions about tilegym-converting-cutile-triton-to-cutile-rs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Triton or cuTile-Python kernel to cutile-rs Rust?

Invoke this skill with the target kernel name; it runs preflight.sh, then routes through Agent A (IR dump and analysis), Agent B (device kernel.rs), Agent D (ffi.rs, wrapper, correctness), and Agent E (performance), with Agent C diagnosing failures.

What does the cutile-rs conversion pipeline produce?

It produces kernel.rs device code, an ffi.rs C-ABI launcher compiled into libcutile_kernels.so, a cffi-based Python wrapper registered as the cutile-rs backend, plus correctness and CUPTI performance reports under the kernel output directory.

Does the skill support multi-variant kernels with different tile configurations?

Yes. Agent A records structural variants in analysis.json with per-variant reference IR, and Agent B writes one cutile entry function per structural variant, including const-generic or literal-specialized entries for baked constants.

What happens when correctness or performance validation fails?

Agent D classifies failures as host or kernel, and Agent C diagnoses IR diffs with an owner tag. The routing table respawns the owning agent within hard spawn caps, and unrecoverable cases end in PIPELINE_COMPLETE or STOP.

What are the limitations of the cutile-rs conversion skill?

It is forward-only (no gradient support), targets the pinned cutile 0.2.0 crates.io dependencies, and stops on environment blockers such as missing GPU, toolchain, or tileiras compiler rather than attempting repairs.