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.8.1b2-cp313-cp313-win_amd64.whl (55.6 MB view details)

Uploaded CPython 3.13Windows x86-64

quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.1 MB view details)

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

quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.0 MB view details)

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

quadrants-0.8.1b2-cp313-cp313-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.1 MB view details)

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

quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.0 MB view details)

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

quadrants-0.8.1b2-cp312-cp312-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.1 MB view details)

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

quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.0 MB view details)

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

quadrants-0.8.1b2-cp311-cp311-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.1 MB view details)

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

quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.0 MB view details)

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

quadrants-0.8.1b2-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.8.1b2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.8.1b2-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.8.1b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 28e037854bc0414b2588d6d4bddbd5f01ce2f13a1dae051476ad84fd9fc1b52b
MD5 fc608e522e32550f17d3b5e8a61d45fb
BLAKE2b-256 aedcc291ccc04d3adc8bd7f72d5eeb602101b06b4c609a04d599b940b646cac0

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80133c7d0487d5a7a9889de05ad3e357a6483c6430542602779592b246a0aaf4
MD5 6caef2e192082e02ff3c49f8c863dc5f
BLAKE2b-256 cd0c6910ec84667c6e21c275be3ef42bb5a0764771fcc078b3f9cee176e283d8

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2164f756ad04f505c44ea7122cf1b0e58015aac91857913e55d9a56077d35ab2
MD5 5f35d7a76d0e5907ec158e5759b06780
BLAKE2b-256 01195644dadcff2d1193c7dcfe9f56732a49feb087087802ce2629b533270fd8

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68d1301d7d7d8b169ffc94186eece0527555516715d81dfe8310bed4908a147d
MD5 8b66602a44309f6ef7f582469b795c71
BLAKE2b-256 398ed2d4e1b49aa9414d3da177d19ea57b5dbf05db32776d76c81b62e1597c76

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.8.1b2-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.8.1b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4cc4387318de7cc1eb1cb97588e664ae0010cba233dca56e917ae69037c6ca8f
MD5 648b15b9dd029027f87b623dce6834e4
BLAKE2b-256 55c8b15b6385d080fbd645585c7a48a3e3a1d995b65e6c80fde8045b0ef62b19

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6ce3fe2e76dee28ce80ffe2e174f0a232e07456cb9790b2300eeee02d3728338
MD5 44371bdbbf06437f29ba791739b8270f
BLAKE2b-256 b0d979f040ed0f0e63c3af92bc4a1954b7aadabda0d330e549ff61a697f55aed

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 944e3fdc74280c2f8081ec6f6987d2578cbc1399778f78e973e919e84d604d9b
MD5 34f9cc62974fceab658ac84ec623ddc0
BLAKE2b-256 bd135af1d8b6d16fb963349af4e7855ea4f60622db1fc10dce8e9d1cefcd1597

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1be0e8d628013f31189c5f0a4e8df2d820e247aa02cfdbc16b3133fcddd35cff
MD5 e4edd75f2186374311c96aafdd10bf97
BLAKE2b-256 0ba4bdc8409b52b4db5a567a3e0ab3f84895df821228a027eb9771b170456a37

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.8.1b2-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.8.1b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c986172c8703e3dd5aecae18a278bc34d9eea688ab6eba24e1f0975e9ac0d00c
MD5 3fe1a82637735b6fdcbee0e08870b4e8
BLAKE2b-256 26ce5cd1c11f97b0d08b885e58d8ec4d94f3c4cbc0d467605cf2464254bf63da

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d6c9f502c4a708d71f839e34830ccfd1791a4ce951ff0e124ef34539743c6f9
MD5 8d4141f9f4c8209e4d239b512405f725
BLAKE2b-256 224af9dbbc9e5d6a3becf62e110e4c4311975f68e4f31330c51cff18287dcc14

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 ff56c6405efde49b8a3672752e8e8a626a322db060cd9ac7623f99e62e0fb324
MD5 e36053ab67119b3823dd6fa4bacbd676
BLAKE2b-256 a2830bebae44b569e688f5499718bd3fc3d7113876bcf9e41260581d289626f2

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4de58d26e934a28af473c2d30fe19e3b991bf366b3bd142a9c7bfc967118b892
MD5 27b12a21030c4a91360276f93a1138cf
BLAKE2b-256 3dedb1107ffa7398792b8b2dc8fe715fcbc52d4025bfd179d0a10a89f8a696a1

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.8.1b2-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.8.1b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f99dcb863b410890826c69934c3e7f0cd1e82a23fbdbb46886a291e7221af5f2
MD5 1d11eb6cdd41532f1a616a74d0c16294
BLAKE2b-256 f8fb548a1da183351c887823e2f8edcdccce8c504ad3e387a0ea212585446656

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cab78ec3f5dbcad20c62abf75f9a822129449806a38c63d81389d76a1fcfa944
MD5 520f769c654d048cb431b7825f6dd542
BLAKE2b-256 04091b42c042d884fc922324c0e49b933978de382cb8d6e8d8ffa18ad503f98c

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 59d695866208599697d6f43551414d55ab0cb367eeb896c95f58058d602eccfd
MD5 8290e8c1a3b8edc8c69851b076dca07b
BLAKE2b-256 d2a2f0ab99e941250d96c00817aca363973eb8770536e37cef826dbd5119012b

See more details on using hashes here.

File details

Details for the file quadrants-0.8.1b2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quadrants-0.8.1b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53ffc5843c8f728925367b3443420994498899c0476c0f802b76212f47c5cdb9
MD5 6657bca7b4fda997c055343a7b94a9ca
BLAKE2b-256 c8c17f17911024b3e4838313312962232ad89481f06b9295c8b55c84034b8f0e

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