Skip to content

leeliu103/TritonToGluon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TritonToGluon

An agentic framework for converting Triton kernels to Gluon kernels and optimizing the performance based on Gluon kernels.

Prerequisites

  1. Set up AgentTemplate before using this project.

  2. Clone the upstream Triton repository:

    git clone git@github.com:triton-lang/triton.git

    The converter agent requires access to the Triton source code to understand op semantics during conversion.

Usage

  1. Create a folder containing your Triton kernel (e.g., ./examples/01-vector-add)

  2. Run the tuner agent:

    cd tuner
    codex -c model_provider="amd-openai"

    Then prompt: tune the triton kernel for ../examples/01-vector-add

    The agent will ask if you want to edit <base>-shape.json to customize tensor shapes before tuning.

  3. Run the converter agent:

    cd converter
    codex -c model_provider="amd-openai"

    Then prompt: convert the triton kernel to gluon kernel for ../examples/01-vector-add

    The agent will ask for the target architecture (e.g., rdna4) and the path to your Triton repository.

Agents

Tuner Agent

Tunes Triton kernel configurations for best performance. Generates shape/config JSON files and harness, then iterates on configs using IR dumps to optimize runtime.

Converter Agent

Converts tuned Triton kernel to Gluon kernel. Uses TTGIR dumps to translate the kernel and iterates until correctness and performance targets are met.

Architecture

Each agent is powered by the Codex CLI. Each subfolder represents a dedicated agent, containing an AGENTS.md file and a collection of skills.

To contribute, update the AGENTS.md file or add/update skills in the corresponding agent folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors