Skip to main content

Uniform API for PyOpenCL and PyCUDA.

Project description

Grunnur, a base layer for GPGPU

pypi package License Docs Coverage Code style: black

What's with the name?

"Grunnur" means "foundation" in Icelandic.

What does it do?

Grunnur is a thin layer on top of PyCUDA and PyOpenCL that makes it easier to write platform-agnostic programs. It is a reworked cluda submodule of Reikna, extracted into a separate module.

Warning: The current version is not very stable and the public API is subject to change as I'm transferring the functionality from Reikna and extending it to support multi-GPU configurations. Bug reports are welcome, and especially welcome are any suggestions about the public API.

Main features

  • For the majority of cases, allows one to write platform-independent code.
  • Simple usage of multiple GPUs (in particular, no need to worry about context switching for CUDA).
  • A way to split kernel code into modules with dependencies between them (see Modules and Snippets).
  • Various mathematical functions (with complex numbers support) organized as modules.
  • Static kernels, where you can use global/local shapes with any kinds of dimensions without worrying about assembling array indices from blockIdx and gridIdx.
  • A temporary buffer manager that can pack several virtual buffers into the same physical one depending on the declared dependencies between them.

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

grunnur-0.3.0.tar.gz (109.9 kB view details)

Uploaded Source

File details

Details for the file grunnur-0.3.0.tar.gz.

File metadata

  • Download URL: grunnur-0.3.0.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for grunnur-0.3.0.tar.gz
Algorithm Hash digest
SHA256 08428ca54402f7ca906ae0224394734f6cf6473198a109436ae26e27da74e940
MD5 651434f1a7a5e7cbabfc225eb2bb1dbe
BLAKE2b-256 e585c1aeb54cca7759503385f27ecd2dae10fe5fe63ee6de4b755becfe7d14ad

See more details on using hashes here.

Supported by

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