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.3.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.3.tar.gz.
File metadata
- Download URL: parajax-0.2.3.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 |
fe3684909615227959987e1ac462726f43ed371cec2f2134e592b59bc040f31a
|
|
| MD5 |
718d1314440defad8f2eb04c4d9d8e72
|
|
| BLAKE2b-256 |
6fa0e0c8d8004751b733f642dc75abedefd0ab12e6cee5ab7ccdbf5d6d6846e8
|
File details
Details for the file parajax-0.2.3-py3-none-any.whl.
File metadata
- Download URL: parajax-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
cfd90612d1b32eeea71a078c9d244ac6e9a3e18a76f88599855b8011ac2a9dd8
|
|
| MD5 |
54a9e56b36ff5bc19ac481cfe6c566b0
|
|
| BLAKE2b-256 |
ce3abdd8fd649aa4d129e6b11b2cdaf0f186bb23239889cdb74a00715af062a2
|