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.1b1-cp313-cp313-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.13Windows x86-64

quadrants-0.8.1b1-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.1b1-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.1b1-cp313-cp313-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

quadrants-0.8.1b1-cp312-cp312-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.12Windows x86-64

quadrants-0.8.1b1-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.1b1-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.1b1-cp312-cp312-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

quadrants-0.8.1b1-cp311-cp311-win_amd64.whl (55.7 MB view details)

Uploaded CPython 3.11Windows x86-64

quadrants-0.8.1b1-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.1b1-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.1b1-cp311-cp311-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

quadrants-0.8.1b1-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.1b1-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.1b1-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-0.8.1b1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: quadrants-0.8.1b1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 55.7 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.1b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cb6d08319cdc12d2320b3c428ce62fa8b5f413549efed6719eaafe03fa96eddd
MD5 483a554fc85a53bc31cef0b0ce965c6f
BLAKE2b-256 867971404c6c638f1bba99037441a6328ff1d5a3d5ffec8217f556f7e1fcbf22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11319eec21665b3dea3ae13ef5f7efa08e494599efc1f5189629fc2ea5456a31
MD5 d4266035176af85b87e64ef444b29c9e
BLAKE2b-256 bcc9b344f51ec4593a5147a49fa10485c5e0bf63e2d7fe2e8cd19e277753814a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 44c1c5b29989f2fe6c5ad8275e48d1956794975585390578b97b191e439ace72
MD5 4d55c7d400e01cdcce7f3b60d6cce259
BLAKE2b-256 58fbfe73dedd45c66b37346d5de701de55611ab127cd0c37072e902dda12462d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b96a9d47e26e5daed466c7dc52eb82109f8ef2d1e73613b366c17e0f080cd2db
MD5 a2aa13212583c1a1de3ff285e015a7d1
BLAKE2b-256 48869608df9ded3348f16a762c1abae16486c1c88227e19077445a56d47f4913

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-0.8.1b1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 55.7 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.1b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8375dc8105eda00704a8d1a82fc5970d2d12e243e7d47ca7f16a493667117337
MD5 ed0a5ba5ab45deccb308f5983d8e184b
BLAKE2b-256 e71524d5136c0a189eb63e0ed633894ea0e1d8c7822bd0b2f944904ff1d1e319

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1d1686ffa3c0ad5de1d82d5a558117d9a9c657f2db33e5e475a3364dbc31743e
MD5 8f25b84c9a213227b94240049cebe550
BLAKE2b-256 600d1bd72295c9d83b730be54d511502b6830b066135739bc65383899b28871e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 df637615e7178241bf6d33bab67cb66264335deceb8a1e1d1bed1e214a2550fc
MD5 98f7e0a7f3c1346d198c7cac59a00c9f
BLAKE2b-256 1d36e8ff9d1938d1d5e6ed224c0c1700ee44bc4b2671db1a9ef16787bde5d54b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27e4c05722c1d6786579078042c101bb577f57c565287c8b2bbcabaec8455945
MD5 7fdb63893d8c186dce8d59ddc2737dfe
BLAKE2b-256 d9bf43eec6ac7929c62ad34c41de5158e1ad678a1b98606280f76103d3939fc6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-0.8.1b1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 55.7 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.1b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ccd6244b6b604b678061eedb6480209826f3f71001755faf36e3f72123be2776
MD5 7f6c1829dae12a82f89ee36a3f7d2754
BLAKE2b-256 fb04f3264179d97a7e7bf3bc2688bd7d71e7d45ceabb1ac170351b6ec50253d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 97813481da0f692d0f417d2026e1c7c78bbb422ee5772e302f7cb3882b83c86d
MD5 fc88ca5288a349dc34cf28ea926af9b6
BLAKE2b-256 aa7b8b658c4a478bb8913d891ba3840b712f2821b6fdf652381f82b4149161af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 af7eb60f8cb03484c416066fd1d002c1f4f8835a740dcddc3222380dc11542e7
MD5 7cd9fae717c3fd4f1025d9e7cb65d6ba
BLAKE2b-256 b605a2288649d0318f5825bb2602c9fab4180f2a40ccd134f4f923991e4dbfcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24268c641bef70609204e69efa58b455f45c0aefd43b767860f5b59ba2203517
MD5 9e5960b6c8c012d88da400c71b45b9c2
BLAKE2b-256 fa920fe8a3b6cb6f270536ed78e30365509db82f1cb86334887346d23cf78027

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-0.8.1b1-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.1b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4c34b63fdae5f2836703737177aa81462666407689583df05fb8d8488059427b
MD5 f07ab9a315a0a1b75fdf20622fa305b5
BLAKE2b-256 d455c0016c48d35aa0f317cf816d530324fba7e4ea5c5cfb1d9515d21939d46c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4c6636b1394489e2fa3db1216054e0af47063c74c795352a2abc61f6cfacb42b
MD5 403c4ce390e00aa31feee4e0f7f69736
BLAKE2b-256 e280f30af4bf60a510be520696173e84caf3cbde7a1850399aac19e260c76e73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 50ced7b89428f680c63883e3221e5288c540216ab4cb11d92b0548c2103f3457
MD5 77f29ab130628693fcab374843382704
BLAKE2b-256 513c95113b8336c9899b6b76b3eb7fd28ea8db8dfcc25c4bd1cdb6ace852e028

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-0.8.1b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 530b09d265a7f7b95eced42b8f860da1e7d498ce81bdea98e60e0575874a0d83
MD5 2ff9e764320a2df410cec56aeda3b4bf
BLAKE2b-256 d45b94ad8a213571250e3d2947a154b5ee9e03eddd2dd57e3bc4ed67729fdcfc

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