GPU Memory & Math Library
Project description
ADAMAH
GPU Memory & Math Library - As simple as possible, but complete.
import adamah
adamah.init()
adamah.put("x", [0, 1, 2, 3])
adamah.sin("y", "x", 4)
print(adamah.get("y")) # [0, 0.841, 0.909, 0.141]
adamah.shutdown()
Install
pip install adamah
Requires: libvulkan-dev (auto-compiles on first use)
Usage
import adamah
# Context manager (recommended)
with adamah.Adamah() as gpu:
gpu.put("a", [1, 2, 3, 4])
gpu.put("b", [4, 3, 2, 1])
gpu.add("c", "a", "b", 4)
print(gpu.get("c")) # [5, 5, 5, 5]
# Or functional API
adamah.init()
adamah.put("x", data)
adamah.sin("y", "x", len(data))
result = adamah.get("y")
adamah.shutdown()
Operations
- Math: sin, cos, tan, exp, log, sqrt, tanh, relu, gelu
- Ops: add, sub, mul, div, pow
- Reduce: sum, max, min, mean, prod
- Calculus: cumsum, diff, integrate, derivative
- Linear Algebra: dot, matvec, softmax
- Generators: linspace, arange
- Sparse: scatter/gather memory maps
License
CC BY-NC 4.0
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 Distribution
adamah-3.0.0.tar.gz
(10.9 kB
view details)
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
adamah-3.0.0-py3-none-any.whl
(11.3 kB
view details)
File details
Details for the file adamah-3.0.0.tar.gz.
File metadata
- Download URL: adamah-3.0.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a18f478d4e422dc0501f64dff3d21fc036559d078160623c00bbdb9c28a7a2a
|
|
| MD5 |
b5bbb94116a45259d2c4410d675da9f6
|
|
| BLAKE2b-256 |
cb69d55c451d3a9814753a0fd52ffef32b4b97a4c0f8ac8de0e5d25dd064a808
|
File details
Details for the file adamah-3.0.0-py3-none-any.whl.
File metadata
- Download URL: adamah-3.0.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea4d2b8a1fc458950fd99fa654e28c40646982e79a47ebe7625fc0143c0bf5e
|
|
| MD5 |
f8a34af57dc1b8cdbaafc9fb4de6317c
|
|
| BLAKE2b-256 |
15c66f3d66b7a7aeee8d8c86ce062303f16a1450478f014b7e1c59a9c4ee1c70
|