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 (Yin & 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 / Tile32x32 — register-resident 16×16 and 32×32 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-1.0.3b2-cp313-cp313-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.13Windows x86-64

quadrants-1.0.3b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.2 MB view details)

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

quadrants-1.0.3b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.1 MB view details)

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

quadrants-1.0.3b2-cp312-cp312-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.12Windows x86-64

quadrants-1.0.3b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.2 MB view details)

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

quadrants-1.0.3b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.1 MB view details)

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

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

Uploaded CPython 3.12macOS 11.0+ ARM64

quadrants-1.0.3b2-cp311-cp311-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.11Windows x86-64

quadrants-1.0.3b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (48.2 MB view details)

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

quadrants-1.0.3b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.1 MB view details)

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

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

Uploaded CPython 3.11macOS 11.0+ ARM64

quadrants-1.0.3b2-cp310-cp310-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.10Windows x86-64

quadrants-1.0.3b2-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-1.0.3b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl (45.1 MB view details)

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

quadrants-1.0.3b2-cp310-cp310-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file quadrants-1.0.3b2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c62088692b96c8230e14219fbec7b3ddd1f6bcf9e4cbe587e1530f6f36135696
MD5 79d7d2c5d44b40aa95e810e4632774b6
BLAKE2b-256 825a3b9a544ffb12b30c8520d0ad42b84eac4f9ddcd7fec2da1f73215d0cb7b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41984d447dc41e3961da40e91b1a3d87b3a7b98ab08886b09004391b5125c812
MD5 a703ad14aa4a306e0bf788e40b9ebfba
BLAKE2b-256 643d8a0e13cb4c658cac48a49efb34d34bdba3a8a07704a11d32b279937c2ebb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 f2ad8e533a4da4308efcf321c86d3e3fed922ce8e46e8fcd60179a93a0b9b21d
MD5 22ac30afb221b6b728cca5be2960594c
BLAKE2b-256 161ea6969b17d295d17b5b6c2a6ef91e2b48941859fc26b5a31cf0af23128110

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb4d58fd16848855daad6028b1cdbe81a12b58361c10ab284534f09b39cce861
MD5 19eb54847fb077af07e9bc022da730a9
BLAKE2b-256 11073ce2d9a0fffc9f2edf1a71b9f81b0b3f07abcf00bf74a05876361fe54ec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 97be7601540c2a08e13cebdfea1b6d3b87c049dc19705e0eab994bd69572bd42
MD5 f6627dcd9f84aff1ebb4f50418e4489a
BLAKE2b-256 b5554e52e2923e02507602f75b01b8cd6e903784af0c7d57704c0e0dc1b5e7ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53c229ecb1a7ae83930ab611e2364360e3cde2ea31cf3c65ecb23432ec60a8b7
MD5 76b4ca50a64dbb210b8d1ab6f382783f
BLAKE2b-256 b0a3e29c1238251a8bb6e21777d4dbd1352b809d171044c8ae0117d8846a49a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 69645443f5357e26ca631e9046aeb3a23d1a8f3c0049319112495395f3017a4e
MD5 2d09c3ba9d5a6cebce3750855bdb1976
BLAKE2b-256 90c7681a7712633ee2a1f5c3125090387c3147dec12f2fb252c53c84d5173ab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ab1698bf7e4da67716338e185d15c2a9265cdc1dc7a9b0b813a7cbf19ca04da
MD5 6e32aaeba8558bc6a9938cc93139ddee
BLAKE2b-256 61c6096e22906f594a44667eb1a9d79bea7cf85d252086ffe850f0f6c326538a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f460774cd5152670599338fd0e3907c10a539a483684e65882e29eb15085d4f3
MD5 e88bfa04b98ffb29d8b3ee41af80f72e
BLAKE2b-256 285899e77e4bd2fc479815c6fdf110d402803af14a02d94844ba7fda6908c99c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4cd2ef7c026fb9ba3ee5a4f1c1eefddba8b827131f891441224991a41af88ee4
MD5 585679ada42538874df192350b270b76
BLAKE2b-256 87879e41922b1d20a62d7e315b94146f3ae6b84a892cdb414f98d316be69f425

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4b95b7c09d474a783a7309305607890d018d52656f8aa49bc9158af5a651d3c2
MD5 e3a751cc2f78cdac9443c8ab75627704
BLAKE2b-256 408b510298e88904a7ca323c1bd81cdbefc589b5e8a5af1b627f6fb7b59fc668

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 286ead9ede31ea02cc1c3ff6c7045306cd81e2b088de4ccb1c4b1b9b04b0bd7c
MD5 8a8f28baa4bbb995c1865e701ae21f22
BLAKE2b-256 90ac8a19a45ffbf4a8ca5450dde8161ec78b0bb20a91102712d1d7d381be3190

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a86e549b579090217d9137b6441ad3e26d44a3e02f8bd982bc925f0becd0da1f
MD5 5e40b8b4d89fe5df1b4b985bdebc14d5
BLAKE2b-256 9083e1e6e05fef818621aea95f7cbc80c49f60a4091845af91545d19f8213d20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 46e3d98d807afcc519bcafa7947a94afc1a526b0caef9bde4147d22172c3c457
MD5 a853633e9f0889a5dbab8457e6d23f1f
BLAKE2b-256 a10971d8c58ff8eb265825c4256f73dcd7ec9ea781c708ecd1378605b9521bd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 1868c39c0ffbce1839c9cee0d56ac63dc010a666677081f20896d30b8982a464
MD5 839fdb534ea20c0dff5ec33cbe8da1f7
BLAKE2b-256 b9059a4d8e7c5f74db1e6739f20ec3b6dbd9c8690c540ccfc5efb304ce78924b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3aede4b0359a1c2b012b1451566191d9232ea982af55f2124f7a1e21a1fee0aa
MD5 629b1e37cd53616307917c98bca8cae4
BLAKE2b-256 2cdd59c42197ecc509ff073eb14a257b69d697f092ada2de31f5c0e3bad69c4c

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