Python-to-MLIR compiler for GPU kernel development and mathematical computing
Project description
Oven Language
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, out_ptr: ol.ptr):
tid = ol.get_tid_x()
idx = tid * 4
# Load vectors
a = ol.vload(a_ptr, idx, 4)
b = ol.vload(b_ptr, idx, 4)
# Add and store
ol.vstore(a + b, out_ptr, idx, 4)
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oven_language-0.1.7-py3-none-any.whl.
File metadata
- Download URL: oven_language-0.1.7-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1334b390d723bad962986a0759f9e684c3788b28b2dd07d9ccbdb19504907cc
|
|
| MD5 |
9ce4eb47cdbda7a79ba72e114c09973a
|
|
| BLAKE2b-256 |
905b51afad96a9d79cffdf3a99b233c17aada6cf33e12071e4d3882735187fa7
|