Skip to main content

Oven Language

Python 3.8+ License: MIT PyPI version Tests Build

A Python-to-MLIR compiler for GPU kernel development.

Installation

pip install oven-language

Quick Start

import oven.language as ol

def vector_add(a_ptr: ol.ptr, b_ptr: ol.ptr, c_ptr: ol.ptr):
    bsize = ol.get_bdim_x()
    bid = ol.get_bid_x()
    tid = ol.get_tid_x()
    idx = (bid * bsize + tid) * 4
    x_value = ol.vload(a_ptr, idx)
    y_value = ol.vload(b_ptr, idx)
    z_value = x_value + y_value
    ol.vstore(z_value, c_ptr, idx)

Compile to MLIR:

oven kernel.py

Key Functions

  • Thread/Block IDs: ol.get_tid_x(), ol.get_bid_x()
  • Memory: ol.load(), ol.store(), ol.vload(), ol.vstore()
  • Math: ol.exp(), ol.log(), ol.sin(), ol.sigmoid()
  • GPU: ol.barrier(), ol.smem()

Links

Metadata

Release files for oven-language 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oven-language 0.1.8
File Size Uploaded
oven_language-0.1.8.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oven-language 0.1.8
File Interpreter ABI Platform
oven_language-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / oven_language-0.1.8.tar.gz

Download URL oven_language-0.1.8.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2adf4c6e726dabb53bb1e4296905610a9a222d8e640ba8a77f25fd5fafc8a1e2
BLAKE2b-256 checksum
How to use checksums
33c43321e5a2b5656520f49f007a674dd6059075767fd8f8b311f41233270d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / oven_language-0.1.8-py3-none-any.whl

Download URL oven_language-0.1.8-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dd9aabb8e720c7ac32de29aa6d83d7c5987ff4a7c36241afa45956355709d94
BLAKE2b-256 checksum
How to use checksums
6a849ed1c9f9f056fcfbe49cab755b58247d3b38590cc00f82746bb39a8c301d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page