adding-cutile-kernel

Adds a cuTile GPU kernel operator to TileGm with full integration.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill adding-cutile-kernel-yo-steven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-cutile-kernel
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/TileGym/adding-cutile-kernel
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill adding-cutile-kernel-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It guides you through registering and validating a new cuTile GPU kernel operator in TileGym so the operator is discoverable, executable on the cuTile backend, and covered by tests and benchmarks.

Core Features & Use Cases

  • Dispatch registration in ops.py: define a single entry-point @dispatch operator function that routes to the active backend and raises NotImplementedError when unsupported.
  • cuTile backend implementation: create the cuTile kernel file and register the implementation using register_impl for the cutile backend.
  • Exports wiring in cutile/init.py: ensure the backend module imports the operator and includes it in __all__ so it loads correctly.
  • Correctness tests: add a pytest suite that selects the backend, uses a PyTorch reference implementation, and asserts numerical accuracy.
  • Performance benchmarking: add a benchmark that compares against a registered torch reference and reports metrics such as GB/s or TFLOPS.
  • Verification workflow: run pytest and lint to confirm the added kernel integrates cleanly across the repository.

Quick Start

Ask the AI to: “Using the adding-cutile-kernel skill, outline the exact files and code changes needed to add and test a new my_op cuTile operator in TileGym, including ops registration, cutile backend code, exports, pytest coverage, and a benchmark.”

Frequently Asked Questions about adding-cutile-kernel

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

FAQPage Schema
How do I add a new GPU kernel operator to TileGym end-to-end?

To add a cuTile GPU kernel operator to TileGym, you wire it end-to-end across dispatch, backend implementation, exports, pytest coverage, and benchmarking. This ensures the operator is discoverable, executable, and validated for performance.

What files need to be modified when registering a cuTile operator in TileGym?

Registering a cuTile operator requires modifying `src/tilegym/ops/ops.py` for dispatch, adding the kernel and `register_impl` in `src/tilegym/ops/cutile/`, and updating imports and `__all__` in `src/tilegym/ops/cutile/__init__.py`.

How do I benchmark a cuTile GPU kernel against a PyTorch reference implementation?

You benchmark a cuTile GPU kernel by adding a benchmark entry that compares its performance against a registered torch reference implementation, reporting metrics such as GB/s or TFLOPS to measure execution speed.

How do I test cuTile GPU kernel correctness in TileGym?

You test cuTile GPU kernel correctness by adding a pytest suite that selects the cuTile backend, runs a PyTorch reference implementation, and asserts numerical accuracy to validate the operator across supported shapes and dtypes.

What is the dispatch mechanism used for routing operators in TileGym?

The dispatch mechanism in TileGym uses a single entry-point `@dispatch` operator function in `src/tilegym/ops/ops.py` that routes operations to the active backend and raises `NotImplementedError` when the backend is unsupported.

Do I need pytest to verify a newly added cuTile operator in TileGym?

Yes, you need pytest to verify a newly added cuTile operator in TileGym. Running pytest and lint confirms that the added kernel integrates cleanly across the repository and passes numerical accuracy checks.