tilelang-cuda-examples-torch

Develop TileLang CUDA kernels for PyTorch operations.

6|1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill tilelang-cuda-examples-torch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilelang-cuda-examples-torch
Source: https://github.com/xchang1121/AutoResearch-CC-hook/tree/main/skills/tilelang-cuda/guides/tilelang-cuda-examples-torch
Command: npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill tilelang-cuda-examples-torch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PyTorch workflows often require custom CUDA kernels for performance; this Skill provides complete TileLang CUDA examples to implement high-performance operations directly in PyTorch.

Core Features & Use Cases

  • CUDA-accelerated TileLang kernels: demonstrates GEMM (matmul), elementwise, layernorm, GEMV, and more.
  • Guided integration: shows how to compile and call TileLang kernels from PyTorch, with out_idx conventions and shared memory usage.
  • Education and prototyping: ideal for learning how to write and benchmark custom kernels in CUDA via TileLang.

Quick Start

Run a sample TileLang CUDA kernel with PyTorch to build a high-performance matrix operation.

Frequently Asked Questions about tilelang-cuda-examples-torch

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

FAQPage Schema
How do I write custom CUDA kernels for PyTorch using TileLang?

To write custom CUDA kernels for PyTorch using TileLang, you define operations like GEMM or elementwise functions with the TileLang DSL, then compile and launch them using proper out_idx conventions and shared memory directly within your PyTorch workflow.

What CUDA operations can I implement with TileLang in PyTorch?

TileLang in PyTorch supports implementing high-performance CUDA operations including GEMM (matmul), elementwise, layernorm, and GEMV kernels, which are ideal for research, benchmarking, and prototyping custom CUDA-enabled workflows.

Can I use TileLang kernels for matrix multiplication and layernorm in PyTorch?

Yes, you can use TileLang kernels for matrix multiplication and layernorm in PyTorch. The DSL provides complete examples for building and integrating these high-performance CUDA kernels into your existing tensor workflows.

Does TileLang handle shared memory and kernel launch conventions for PyTorch integration?

TileLang handles shared memory and kernel launch conventions for PyTorch integration by demonstrating proper out_idx usage and shared-memory allocation, ensuring your custom CUDA kernels execute efficiently within the PyTorch runtime.

Why use TileLang instead of writing raw CUDA C++ kernels for PyTorch?

Using TileLang instead of raw CUDA C++ for PyTorch simplifies kernel development by providing a higher-level DSL for GEMM and normalization operations, while still enabling shared-memory optimization and direct compilation into high-performance CUDA code.

What are the limitations of using TileLang CUDA kernels in PyTorch workflows?

The limitations of using TileLang CUDA kernels in PyTorch workflows center on its intermediate implementation depth, making it best suited for education, benchmarking, and prototyping rather than immediate production deployment without further optimization.