Parallelization utilities for JAX
Project description
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
autopmap
Installation
pip install parajax
Example
import multiprocessing
import jax
import jax.numpy as jnp
from parajax import autopmap
jax.config.update("jax_num_cpu_devices", multiprocessing.cpu_count())
# ^ Only needed on CPU: allow JAX to use all CPU cores
@autopmap
def square(x):
return x**2
xs = jnp.arange(97)
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.
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
parajax-0.2.4.tar.gz
(4.3 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
File details
Details for the file parajax-0.2.4.tar.gz.
File metadata
- Download URL: parajax-0.2.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d67dca6a66ad2ad19904dd11dffc35e47301534b8e8223926785586d4252f8c
|
|
| MD5 |
61c25279d14f8d9da98642a021c60910
|
|
| BLAKE2b-256 |
396ff285917b28b24ddf6408910ff06c05ce96f3ce710610ccc96715e9aeef96
|
File details
Details for the file parajax-0.2.4-py3-none-any.whl.
File metadata
- Download URL: parajax-0.2.4-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47817a7dfc6295482dc9314a9c07148e803cf1653dd97adfaea77288be7f2d50
|
|
| MD5 |
bc8f24dfdb5276e0038bffffca999692
|
|
| BLAKE2b-256 |
f58475196c06238020c88479f2ee4e670b7be0069fe8e4033d08253249d9f197
|