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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oven_language-0.1.8.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oven_language-0.1.8-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file oven_language-0.1.8.tar.gz.

File metadata

  • Download URL: oven_language-0.1.8.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for oven_language-0.1.8.tar.gz
Algorithm Hash digest
SHA256 2adf4c6e726dabb53bb1e4296905610a9a222d8e640ba8a77f25fd5fafc8a1e2
MD5 7d216c2ef9ccb1d93f3e9c5004559694
BLAKE2b-256 33c43321e5a2b5656520f49f007a674dd6059075767fd8f8b311f41233270d64

See more details on using hashes here.

File details

Details for the file oven_language-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: oven_language-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for oven_language-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd9aabb8e720c7ac32de29aa6d83d7c5987ff4a7c36241afa45956355709d94
MD5 5c9907ee7859ed0422aa80c35fbef0f3
BLAKE2b-256 6a849ed1c9f9f056fcfbe49cab755b58247d3b38590cc00f82746bb39a8c301d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 files

0.1.7

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page