Coder Social home page Coder Social logo

jeffra / triton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from triton-lang/triton

0.0 1.0 0.0 35.02 MB

Development repository for the Triton language and compiler

License: Other

CMake 0.59% C++ 93.09% Python 5.82% C 0.27% Objective-C 0.01% Cuda 0.22%

triton's Introduction

Triton

This is the development repository of Triton, a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton is to provide an open-source environment to write fast code at higher productivity than CUDA, but also with higher flexibility than other existing DSLs.

The main components of Triton at the moment are:

  • Triton-C: An imperative, single-threaded language for writing highly efficient compute-kernels at a relatively high abstraction level (think numpy-like array operations in a C-like language).
  • Triton-IR: A special-purpose intermediate representation (Triton-IR) for aiding array-level program analysis and optimizations in Triton-C programs.
  • Triton-JIT: An optimizing just-in-time compiler for Triton-IR, which generates GPU code on par with state-of-the-art CUDA-C (e.g., CUTLASS). This includes transparent support for mixed-precision and Tensor Cores.

Bindings for automatic PyTorch custom op generations are included in PyTriton, along with a small DSL based on einsum that supports convolutions, shift-convolutions, direct einsums, etc.

The formal foundations of this project are described in the following MAPL2019 publication: Triton: An Intermediate Language and Compiler for Tiled Neural Network Computations. Please consider citing us if you use our work!

Installation

Triton is a fairly self-contained package and uses its own parser (forked from wgtcc) and LLVM-8.0+ for code generation.

You can install the latest release with pip as follows:

sudo apt-get install llvm-9-dev
pip install triton

or the latest development version with:

 pip install -e "git+https://github.com/ptillet/triton.git#egg=triton&subdirectory=python"

for the C++ package:

git clone https://github.com/ptillet/triton.git;
mkdir build;
cd build;
cmake ../;
make -j8;

Getting Started

Please visit the documentation to get started with Triton

Contributing

Please keep in mind that this is a project I have been carrying out completely on my own as part of my Ph.D. thesis. While I am confident in the approach, there are still many things to fix and to polish. Please contact me (ptillet AT g.harvard.edu) or raise an issue if you want to contribute!

triton's People

Contributors

ptillet avatar jack-willturner avatar davidcox avatar ngaloppo avatar laureatian avatar wujunkai166 avatar karlrupp avatar gongzg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.