Skip to main content

Write GPU kernels in Python, run on any GPU

Project description

WAVE Python SDK

Write GPU kernels in Python, run on any GPU.

Install

pip install wave-gpu

Usage

import wave_gpu

@wave_gpu.kernel
def vector_add(a: wave_gpu.f32[:], b: wave_gpu.f32[:], out: wave_gpu.f32[:], n: wave_gpu.u32):
    gid = wave_gpu.thread_id()
    if gid < n:
        out[gid] = a[gid] + b[gid]

a = wave_gpu.array([1.0, 2.0, 3.0, 4.0])
b = wave_gpu.array([5.0, 6.0, 7.0, 8.0])
out = wave_gpu.zeros(4)
vector_add(a, b, out, len(a))
print(out.to_list())  # [6.0, 8.0, 10.0, 12.0]

License

Apache 2.0 - see LICENSE

Project details


Download files

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

Source Distribution

wave_gpu-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

wave_gpu-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file wave_gpu-0.1.1.tar.gz.

File metadata

  • Download URL: wave_gpu-0.1.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wave_gpu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f99178486c38c4422e1f7d6cf290d2645be7838a292ec6544153f34d3092355d
MD5 1c7bd68fdd477c52aa08ddba62c628d9
BLAKE2b-256 577033b3dda29a132ec839f5efb5699f063e4593b0d3afffa90763f663578825

See more details on using hashes here.

File details

Details for the file wave_gpu-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: wave_gpu-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wave_gpu-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 269ef2c8fa783898bf7dfad6c226eed1733fa0fa08a0cf792b45dd90d22250a5
MD5 31f6ada7f123a8267a3227baece63e41
BLAKE2b-256 5860c29c2bec4364274b9bb212b7dd318340e385bb2a13a2c48ee85c26907e30

See more details on using hashes here.

Supported by

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