Skip to main content
Parajax

Automagic parallelization of calls to JAX-based functions

Documentation CI Codecov Ruff ty uv Publish PyPI PyPI - Python Version

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.

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parajax-0.3.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file parajax-0.3.3.tar.gz.

File metadata

  • Download URL: parajax-0.3.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for parajax-0.3.3.tar.gz
Algorithm Hash digest
SHA256 8c44652d5bc6537b9291d45de1fd1181e6ae411ec92ed0a83de2455648b3318d
MD5 10d3a4b878729de0c4e1339c94acd753
BLAKE2b-256 8d602303f8045feac76229c9d744fc51944ae1876753ae7604d77f53c278c9db

See more details on using hashes here.

File details

Details for the file parajax-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: parajax-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for parajax-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 627025dee12652e832dca44deefcb8595afff9571e349834e6b167825c0167b0
MD5 b004ed2e7f58e42bd064d4aeded9d4ed
BLAKE2b-256 0c8f20b8e0337ee22a3f8d52a0185519092ac138028da6c00f343ab0cca5e39b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page