--- id: quadrants version: "1.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # quadrants — The Quadrants Programming Language License: permissive · Maintenance: active · Downloads: 172.0K/mo ## What it is and what it does Quadrants is a compiler that accepts Python code decorated with `@qd.kernel` and compiles it into highly optimized parallel code for execution on multiple hardware backends—NVIDIA CUDA, AMD ROCm, Apple Metal, Vulkan, and CPUs. It evolved from Taichi as a fully independent project focused on large-scale physics simulation and robotics workloads. The compiler includes structured data support via dataclasses, a unified tensor API with layout control, autodiff with dynamic loops, GPU graph capture, and SIMT primitives like tile operations and subgroup reductions. The package ships with pre-built wheels for modern Python versions (3.10–3.13) across macOS, Linux, and Windows, reducing installation friction. It depends on numpy, pydantic, rich, dill, colorama, cffi, and setuptools. Key features include zero-copy interop with PyTorch and NumPy via DLPack, a Python backend for debugging, and optional fastcache for reduced kernel load times. The project is actively maintained, with recent releases and no known security vulnerabilities. Use it for: - Compile physics simulation kernels for robotics training and control on GPUs without manual CUDA/HIP programming. - Accelerate large-scale differentiable simulations with autodiff support for gradient-based optimization. - Deploy cross-platform GPU code (CUDA, Metal, ROCm, Vulkan) from a single Python source without rewriting for each backend. - Debug compiled kernels using the Python backend to step through code in a standard Python debugger before GPU deployment. - Integrate GPU-accelerated simulation into PyTorch or NumPy workflows via zero-copy tensor interop. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Quadrants is a high-performance compiler that translates Python code into optimized parallel kernels for physics simulation and robotics, targeting NVIDIA GPUs, AMD GPUs, Apple Metal, Vulkan-compatible GPUs, and CPUs. Yes, if you need to write GPU-accelerated physics or robotics simulations in Python without manual kernel programming. The compiler is actively maintained, has no known vulnerabilities, and offers permissive licensing. Install friction is moderate due to compiled wheels, but pre-built binaries cover standard platforms. Verify that the feature set (especially newer additions like fastcache and GPU graphs) meets your stability requirements and that the community ecosystem is sufficient for your use case. ## Install pip install quadrants uv add quadrants poetry add quadrants ## Installing quadrants Before you install: Medium install friction due to compiled wheels for multiple Python versions (3.10–3.13) and platforms, but pre-built binaries are available for macOS, Linux, and Windows. Active maintenance with a release 3 days old and recent commits. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for both open-source and proprietary projects. Quickstart: pip install quadrants import quadrants as qd import numpy as np @qd.kernel def add_kernel(x: qd.Tensor, y: qd.Tensor, z: qd.Tensor): for i in range(x.shape[0]): z[i] = x[i] + y[i] x = qd.Tensor(np.array([1.0, 2.0])) y = qd.Tensor(np.array([3.0, 4.0])) z = qd.Tensor(np.zeros(2)) add_kernel(x, y, z) Requires Python 3.10–3.13; Mac OS 14+, Windows, or Ubuntu 22.04+ (or compatible); ROCm 5.2+ for AMD GPU support. Verify before relying: - Actual performance improvements (4.5× ndarray CPU, 30% GPU overhead vs. fields) on representative user workloads outside Genesis benchmarks. - Stability and maturity of newer features (fastcache, GPU graphs, perf_dispatch, tile primitives) in production use. - Backward compatibility guarantees or migration path from upstream Taichi for existing code. - Community size and third-party ecosystem relative to other physics simulation frameworks. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 172.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags physics simulation compiler, GPU kernel compiler python, parallel computing framework, robotics simulation engine, multi-platform GPU programming, gpu-computing, physics-simulation, jit-compiler [View on SkillFed](https://skillfed.io/packages/quadrants) · [View on PyPI](https://pypi.org/project/quadrants/)