Skip to main content

JAX Speed Optimizations

Project description

JAXSPD

JAXSPD (JAX Speed Optimizations) is a Python package that provides speed optimizations for JAX. This package is particularly useful for users who need to optimize their JAX code for better performance.

Features

  • Optimized JIT compilation support
  • Enhanced GPU support for NVIDIA GPUs
  • Advanced optimization utilities
  • Memory efficiency tools
  • Profiling and debugging capabilities

Installation

You can install JAXSPD using pip:

pip install jaxspd

For GPU support, install with the GPU extras:

pip install jaxspd[gpu]

Usage

Basic JIT Usage

import jaxspd as jx

@jx.jit
def my_function(x):
    return x * 2 + 1

# The function will be JIT-compiled
result = my_function(5)

GPU Optimizations

import jaxspd as jx

# Enable GPU optimizations
jx.enable_gpu_optimizations()

# Your GPU-optimized code here

Advanced Optimizations

import jaxspd as jx

# Auto-JIT with memory optimization
@jx.auto_jit
def optimized_function(x):
    return jnp.sum(jnp.exp(x))

# Memory-efficient processing
@jx.memory_efficient(max_memory=1e9)  # 1GB max memory
def process_large_array(x):
    return jnp.mean(x, axis=0)

# Shape optimization
@jx.optimize_for_shape(static_shapes={"x": (1000, 1000)})
def matrix_operation(x):
    return jnp.dot(x, x.T)

# Operation fusion
@jx.fused_operations(fusion_level=2)
def fused_computation(x):
    return jnp.sum(jnp.exp(jnp.dot(x, x.T)))

Requirements

  • Python >= 3.8
  • JAX >= 0.4.13
  • JAXlib >= 0.4.13
  • NumPy >= 1.20.0

For GPU support:

  • CUDA-compatible GPU
  • CUDA toolkit
  • cuDNN

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaxspd-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

jaxspd-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file jaxspd-0.1.1.tar.gz.

File metadata

  • Download URL: jaxspd-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for jaxspd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 51ec1b5229422a0c9cc4e5c48f54170f5f2485c0ac14383709dc9319ed256e9d
MD5 f75dde66c6ac5758d8cde30b7f842803
BLAKE2b-256 9b13a93975cb2dc0bf988d6c699aed08304b0ceb9f7b0d41c369b9d312da9bce

See more details on using hashes here.

File details

Details for the file jaxspd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jaxspd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for jaxspd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 086640ec7d4db31b93d75f331276d39dd5fe24fbd3f2b0b3e66e1c293245c621
MD5 cfd29f5e513a83f15d7dbde7a164c019
BLAKE2b-256 7fedcea38834ba8f70c994bd14a47828067737445e3d226af6331913fa7527c1

See more details on using hashes here.

Supported by

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