Skip to main content

The Quadrants Programming Language

Project description

What is Quadrants?

Quadrants is a high-performance multi-platform compiler for physics simulation being continuously developed by Genesis AI.

It is designed for large-scale physics simulation and robotics workloads. It compiles Python code into highly optimized parallel kernels that run on:

  • NVIDIA GPUs (CUDA)
  • Vulkan-compatible GPUs (SPIR-V)
  • Apple Metal GPUs
  • AMD GPUs (ROCm HIP)
  • x86 and ARM64 CPUs

The origin

The quadrants project was originally forked from Taichi in June 2025. As the original Taichi is no longer being maintained and the codebase evolved into a fully independent compiler with its own direction and long-term roadmap, we decided to give it a name that reflects both its roots and its new identity. The name Quadrants is inspired by the Chinese saying:

太极生两仪,两仪生四象

The Supreme Polarity (Taichi) gives rise to the Two Modes (Ying & Yang), which in turn give rise to the Four Forms (Quadrants).

Quadrants captures the idea of progression originated from taichi — built on the same foundation, evolving in its own direction while acknowledging its roots. This project is now fully independent and does not aim to maintain backward compatibility with upstream Taichi.

How Quadrants differs from upstream Taichi

While the repository still resembles upstream in structure, major changes include:

Platform support

  • LLVM 22, ARM (aarch64) support

CI

  • Kernel-level code coverage — device-side branch coverage in standard coverage.py format, integrated with pytest-cov
  • AI-driven checks for line wrapping, deleted comments, test coverage, and feature factorization

Structural improvements

  • dataclasses.dataclass structs — work with ndarrays and fields, nestable, passable to qd.func, zero kernel-runtime overhead
  • qd.Tensor — unified API over fields and ndarrays with per-tensor layout control, pickle support, and a backend= switch
  • BufferView — safe sub-range ndarray access with bounds checking in debug mode

Removed components

To focus the compiler and reduce maintenance burden, we removed: GUI/GGUI, C-API, AOT, DX11/DX12, iOS/Android, OpenGL/GLES, argpack, CLI.

Performance

  • Reduced launch latency — ndarray CPU performance improved 4.5×; ndarray GPU performance went from 11× slower than fields to ~30% slower (5090 GPU, Genesis benchmark)
  • Fastcache — opt-in source-level cache (@qd.kernel(fastcache=True)) that bypasses front-end AST parsing; reduces warm-cache kernel load from 7.2 s → 0.3 s on Genesis benchmarks
  • GPU Graphs@qd.kernel(graph=True) captures kernel sequences into a graph; qd.graph_do_while runs GPU-side iteration loops (hardware conditional nodes on CUDA SM 9.0+)
  • perf_dispatch — auto-benchmarks multiple kernel implementations and selects the fastest at runtime
  • Zero-copy interopto_torch(copy=False) / to_numpy(copy=False) via DLPack on CUDA, CPU, AMDGPU, and Metal; direct torch tensor pass-through into kernels

SIMT primitives

  • Tile16x16 — register-resident 16×16 matrix tiles with Cholesky, triangular solve, and rank-1 updates; 5× faster than shared-memory baselines on blocked linear algebra
  • Subgroup ops — cross-platform shuffle, shuffle_down, reduce_add, reduce_all_add across CUDA, AMDGPU, Metal and Vulkan

Autodiff

  • Autodiff with dynamic loops — computes the gradient of any kernel transparently using reverse-mode differentiation and runtime-based memory allocation
  • Forward-mode AD, custom gradients (@qd.ad.grad_replaced), qd.ad.Tape

Debugging & development

  • Python backendqd.init(qd.python) interprets kernels as plain Python so they can be stepped through in a standard Python debugger

Installation

Prerequisites

  • Python 3.10-3.13
  • Mac OS 14, 15, Windows, or Ubuntu 22.04-24.04 or compatible
  • ROCm 5.2 or newer for AMD GPU support

Procedure

pip install quadrants

(For how to build from source, see our CI build scripts, e.g. linux build scripts )

Documentation

Something is broken!

Acknowledgements

Quadrants stands on the shoulders of the original Taichi project, built with care and vision by many contributors over the years. For the full list of contributors and credits, see the original Taichi repository.

We are grateful for that foundation.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

quadrants-0.7.8-cp313-cp313-win_amd64.whl (55.6 MB view details)

Uploaded CPython 3.13Windows x86-64

quadrants-0.7.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

quadrants-0.7.8-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (44.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.34+ ARM64

quadrants-0.7.8-cp313-cp313-macosx_11_0_arm64.whl (30.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

quadrants-0.7.8-cp312-cp312-win_amd64.whl (55.6 MB view details)

Uploaded CPython 3.12Windows x86-64

quadrants-0.7.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

quadrants-0.7.8-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (44.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.34+ ARM64

quadrants-0.7.8-cp312-cp312-macosx_11_0_arm64.whl (30.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

quadrants-0.7.8-cp311-cp311-win_amd64.whl (55.6 MB view details)

Uploaded CPython 3.11Windows x86-64

quadrants-0.7.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

quadrants-0.7.8-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (44.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.34+ ARM64

quadrants-0.7.8-cp311-cp311-macosx_11_0_arm64.whl (30.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

quadrants-0.7.8-cp310-cp310-win_amd64.whl (55.6 MB view details)

Uploaded CPython 3.10Windows x86-64

quadrants-0.7.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

quadrants-0.7.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (44.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64manylinux: glibc 2.34+ ARM64

quadrants-0.7.8-cp310-cp310-macosx_11_0_arm64.whl (30.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file quadrants-0.7.8-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.7.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 55.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for quadrants-0.7.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d8c54f55b8a3f44ed059a5585a8f6cad8e4fb65ea0c73a9f69e3b07f9841ea70
MD5 fc5f8f82a17f3d5d20aa468cbb37bf79
BLAKE2b-256 4f5465b8a58f894b283ca10837008040661c27030684304ff3e00785a73ee699

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b78dc821bbedd8ae4e63093b68be9d8b1f52d575631d1a4c856f7573af95f4ce
MD5 870772aa3c2e99f9784ad9746ac5fb6f
BLAKE2b-256 d95ce736cf43b18d62aaa550c500bee6ec8774a86a6dd4c97a981c6e5defe432

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7376f925179d009bb6ad2c19974c04b6e56a3808502e537192a302a8adcb3d4f
MD5 f1c181700f005851bd7969820eb3e12e
BLAKE2b-256 a5f246d175f6226234504ce72a70436badafcd02e65c71ca16fa13f112fd3fea

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44a0ff386e2f54a738b45c165eb98aa123eecf349a1b20334622ee8669ce015a
MD5 1142a56d4e6c57df8f3145d2897736d6
BLAKE2b-256 68a115faa8e6888b822b2fd75eee46c7d5c0cd543cf6571299f5fb75f71fe40a

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.7.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 55.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for quadrants-0.7.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5de3495cb1eb44d0396e5087b74ac67c86f635b0dc17db24638c07abb0fa7977
MD5 5000653a60eceb6a5601d0cd351e97a1
BLAKE2b-256 4a89620024757920e10cc1f92839f059578f0d8618b476b134a855c966df3ac2

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7440e5d8429ed3049288fb8b9e5f897104210be3bcef61aebaf6cecf51807527
MD5 c75e5445c05b6e1d2bfc2d074108e3be
BLAKE2b-256 1a5dacfbff1b17a2998de443fed2b3c923da3aa430f22d3c08c7ecce6ebe77d8

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e1640f55e30f71f8ce287726946eab2928f26199046a1b9b29810f28a6cf4805
MD5 144559a378c252778681f3c76213b209
BLAKE2b-256 0e5552e557305c2fb7fb4f1269bc9fa1a228ad171cfcb1d51d6d6730e43499ba

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 954918b105e6e14afd0544d87237fb50f906d294b1bad9e14f9e8963a55dc603
MD5 f34de0f1d52316fdb3c88f81c8745344
BLAKE2b-256 a8dc4c2d4a844328e67359880c97113bad74adf46f52d220d6807e0cd44abfef

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.7.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 55.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for quadrants-0.7.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 56560142925d9a34958f49a3729efee7689d381bcb14dcc7d0c5c582b26af683
MD5 74e8e5cca62cb92582ae88b9a0b645f1
BLAKE2b-256 bc194e022822d8e880db99de03887903829c2392b107160975efaccf3e19475d

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e30f0688624ac7799e935aaee7b07fcdaeeb8597cee423e1b4e49b8b95dbbbb
MD5 fde1a8917764fa26e4556c11ead2334e
BLAKE2b-256 c63a26e2d9feca25c9ebcc1eb939752c72bb2e66111abe37263fa7340ac348ab

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2f933e08b26147b8e4e78394567fabe095664deee07734f78e5abbba86b1356c
MD5 26889c5b2ef1cdf392413742d70d24d3
BLAKE2b-256 542a6f1c12a1b7b2e8cc266454ce29b833e7805861c2f7b1b4a0fc822c876a3d

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df658230f8b23a292598bb83a4afef4b2a67d934c244c48f53a4e5a8ab296c19
MD5 da894d3f5708cf96c630c362e079b1d6
BLAKE2b-256 2f179042cd7170db5cd1fc799e5445ade384894a8971f6c3298905da1b08eb7c

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.7.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 55.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for quadrants-0.7.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7e50eb12c4b30d7db9c68d17701dc0b439f8f0f4909aaa392acf43795d73e03a
MD5 9228fa3934cfac0dcb88224507ac8c58
BLAKE2b-256 a961309de26adbac88c32ce42cfbbe0ce9665e6da05b05a569ff4e359944f62f

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 340dceba3384750c62616a32f927851c4866addcc324e8e28e1b1c1d6154028b
MD5 6d2365fdc1c4ffbfed4c6e3546215168
BLAKE2b-256 9aeffe154607fe239cce8532ac73c9b70a56bc42251bcc2814d054b605fafe5e

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 dd064122841d3972fecf4e0b1a45568e5c083d24889bc702d7fcebef5df73133
MD5 213bb9d74b490b6247b536c1518bba05
BLAKE2b-256 15414a1d912585786d03b80b51ccffcf1a4c46b13568d37c50f1c1d9e7004728

See more details on using hashes here.

File details

Details for the file quadrants-0.7.8-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.7.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d56baa6cb076e9f7e05aa574cd9c24f13edceece7e1a70c3d79b89553ae3d09e
MD5 2590a98901402fe39928059aa1b24a0d
BLAKE2b-256 93233f6b030cb354ae2de37ea44ed2b209b777d80117f7483d0c86ed9650b40e

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