A programming language for GPU computing and AI

One kernelEvery GPU

$ curl -fsSL https://emma-lang.org/install.sh | sh
SyntaxSwift-like
SpeedC-like
TargetsCUDA, ROCm, Vulkan

Write onceCompile to the metal

The same kernel compiles to every backend. Switch targets in your build, not in your code.

  1. 01

    Write

    One kernel, in a clean syntax that reads like Swift. From prototype to production, it stays easy to understand.

  2. 02

    Lower

    The compiler lowers it through MLIR and LLVM. Builder functions can emit hardware-specific MLIR on the way down.

  3. 03

    Target

    The same kernel compiles for CUDA, ROCm or Vulkan.

  4. 04

    Run

    Deploy across NVIDIA, AMD and more, at C speed.

vectorAdd.emma
build.toml
vectorAdd.mlir
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// lowered from vectorAdd.emmagpu.func @vectorAdd(%a: memref<?xf32>, %b: memref<?xf32>,                    %c: memref<?xf32>) kernel {  %i = gpu.global_id x  %x = memref.load %a[%i] : memref<?xf32>  %y = memref.load %b[%i] : memref<?xf32>  %s = arith.addf %x, %y : f32  memref.store %s, %c[%i] : memref<?xf32>  gpu.return}
[package]name = "vector-add"version = "0.1.0" [build]targets = ["cuda", "rocm", "vulkan"]
TerminalIllustrative output
$ emma build
cuda vectorAdd.ptx
rocm vectorAdd.hsaco
vulkan vectorAdd.spv
Built 3 targets from 1 kernel

Intuitive syntax

Enjoy a clean, readable syntax without compromising on speed. From prototype to production, your code will be easy to understand and maintain.

Native async/await

Effortlessly handle asynchronous operations with native support for async/await, making your code more readable and maintainable.

Builder functions

Easily generate hardware-optimized MLIR code at compile time, to optimize performance without sacrificing developer productivity.

GPU kernel support

Emma automatically compiles kernels for CUDA, ROCm, or Vulkan, empowering seamless deployment across NVIDIA, AMD, and more.

Low-level control

Develop low-level system software at C speed, with the safety, developer experience and productivity of high-level application development.

Gradual migration

Easily migrate your code from other languages (including CUDA) to Emma, with a gradual migration path that makes it easy to adopt Emma's features and syntax.

Gradual migration

Bring your CUDA code Move at your own pace

Bind existing CUDA kernels into an Emma program and call them like native Emma kernels. Port them one at a time.

vectorAdd.cu7 linesvectorAdd.emma3 lines__global__ void vectorAdd(const float *a, const float *b, float *c, int n) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < n) { c[i] = a[i] + b[i]; }}kernel func vectorAdd(a: Float[], b: Float[], c: Float[]) { c[id.x] = a[id.x] + b[id.x]}__global__ void vectorAdd( const float *a, const float *b, float *c, int n) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < n) { c[i] = a[i] + b[i]; }}kernel func vectorAdd( a: Float[], b: Float[], c: Float[]) { c[id.x] = a[id.x] + b[id.x]}

One language from the model down to the microcontroller

AI frameworks, GPU kernels, operating systems, display drivers and embedded systems

Roadmap What is coming next

ShippedIn progressPlanned