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.5.0.tar.gz (115.2 kB view details)

Uploaded Source

Built Distribution

grunnur-0.5.0-py3-none-any.whl (85.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grunnur-0.5.0.tar.gz
  • Upload date:
  • Size: 115.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for grunnur-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b76182b7045e67d9eb7e0902e39d9cc6940dc3221aa3d1c168007183dc01ce89
MD5 c21f5dae70bd4a08c76b521c3af61819
BLAKE2b-256 efb1725b2d4bb9fd1f3061e9e82e0421b251d53cfda7153426f7a6068fbb1889

See more details on using hashes here.

File details

Details for the file grunnur-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: grunnur-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 85.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for grunnur-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3efc0e5883cb9da6199240a795f1e6dd03fb769dbc55879c347d140206949d42
MD5 6e6e63fdc736d3a31cfbcdfb29e4b975
BLAKE2b-256 0240175f51406e86e1aeec4927b43a1332c2fcaba6e418356eb4bf46ab244d2a

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