Features
- 🚀 Device-parallel execution: run across multiple CPUs, GPUs or TPUs automatically
- 🧩 Fully composable with
@jax.jit,@jax.vmap, and other JAX transformations - 🪄 Automatic handling of input shapes not divisible by the number of devices
- 🎯 Simple interface: just decorate your function with
@parallelize
Installation
pip install parajax
Example
import multiprocessing
import jax
import jax.numpy as jnp
from parajax import parallelize
jax.config.update("jax_num_cpu_devices", multiprocessing.cpu_count())
# ^ Only needed on CPU: allow JAX to use all CPU cores
@parallelize
def square(xs):
return xs**2
xs = jnp.arange(12_345)
ys = square(xs)
That's it! Invocations of square will now be automatically parallelized across all available devices.
Documentation
For more details, check out the documentation.
Metadata
Release files for parajax 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parajax-0.3.5.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parajax-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / parajax-0.3.5.tar.gz
| Download URL | parajax-0.3.5.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d221bae3e603a552a02f595f54a16541f8ae980dd139146a7292dd8c66627e62
|
|
BLAKE2b-256 checksum How to use checksums |
d56d44cbaa63120f596c397b9e62e92c051ef0a63aa01fa726913be1db5329f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / parajax-0.3.5-py3-none-any.whl
| Download URL | parajax-0.3.5-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
535bd501be70a6e1e92c9a9ec7c2831bcde686f91a9df0ea391610ed30fcdbef
|
|
BLAKE2b-256 checksum How to use checksums |
ead12ee919fffc96c591017731580d868f37d9a2e87b2ab5f6adb95428cd8f6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|