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

Uploaded CPython 3.13Windows x86-64

quadrants-1.0.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-1.0.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-1.0.1b2-cp313-cp313-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

quadrants-1.0.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-1.0.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-1.0.1b2-cp312-cp312-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

quadrants-1.0.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-1.0.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-1.0.1b2-cp311-cp311-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

quadrants-1.0.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-1.0.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-1.0.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-1.0.1b2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: quadrants-1.0.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-1.0.1b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8dd5e53ab47266f93ed540342d7588fd10c8d6410efbb82475af27ecbc2383a4
MD5 0bca87c90ffa4748d74e1754db3b3b17
BLAKE2b-256 2d797b2a11cb0a2ae5751c6914af97fd8d855d731558d269b5203cda4be459f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21bbaeb52c97e3019a120e7838d3c2d0b9c44f25547ed052457d8b566961e528
MD5 2d875158c198e92f497b1708f018918a
BLAKE2b-256 242d00d230484df2441e702f2ef6efeafa185bd0f1ddd40d9267745be0b2d53a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 f8c1d95b66388f8d3a938c4e41e764cadd4f18f6a8a6ef51d4f0752623eb1e11
MD5 ace7f957e08c5b36810fa72331161c65
BLAKE2b-256 d68bf774addaf32297bb74a1daff3cb847d7c785439243c376fecb3eb1e855ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 208ceffcec8d38bfdec3b75652d1e17da25093aeb3d534de85780ce16ace3056
MD5 5dfad53b6c8ca767b12e9cbe89bf4d0b
BLAKE2b-256 4cee65d862a4efdd77d5a85d56e01dd86793ff2cf3bcd096b750499c5ff7ca80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-1.0.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-1.0.1b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9d62bef6250043060f870c33baf1cae0f9a4a64dc7cb74935b56fe2896c6c651
MD5 bdb2ecaccb3550a866039edc3815e0a5
BLAKE2b-256 f749a76d1853780069d3814913f6b3a98a1d8a754ea7a091bbfe116371caff08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cfbae22f514bc98e04d447937f17f745a272b0c7cc351a5487ab5a579fa373f6
MD5 b39ffe6ffecfbcb6ed2c888ae00b7f04
BLAKE2b-256 3a9cebf55ceceae90bfee9801297874e2c48906727f84dc2667e54831d56f3cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 9038e68d8e3f56a68a2a151bb4fd571316fa661c610caeb7245410e29af3d3c5
MD5 759699bf080c3c858c81bda7bfc411e9
BLAKE2b-256 9204bb61591ece6be49d34cda6d07567c14362aa20d9be35325bc46e48f85a5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4ae6ff4a0ce9ace69c5a93bd5b81b60a9a2ef738cab9d451f16705dcce9e7d3
MD5 a4ed890c422e4072ad1dab8abf9863e9
BLAKE2b-256 cb5c4dced79a6feabd26f4944a637db97fafdd80fea5bfee4c928eb4237bcda7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-1.0.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-1.0.1b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9a2df6def135a829f37ab06aeaf673bce36ef25d5b43bd7328ca409551120dcb
MD5 dfa73b5efb309cb9c82c004e05c160d3
BLAKE2b-256 7e204855aa02f0533b2ce70b35b987249d8a0e14b58a9d3d9d51f5a47afdb1f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a8273c54caaaab066fb7718faf69b24d316df74ccf138a8df856024a78cf64c1
MD5 4df421b31e3bd38372fc5ebb3516558a
BLAKE2b-256 a98b0860da278f77e5ec658bff2bc411665f1e72b1b2e2f7cb59e01a1549c2c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 6ae8d698ce2afedd0f71de21eb9ca001f6c981c304b831efaea9e6c0dccf8197
MD5 cced1adfe0e9b662bb93f3667dfd53ec
BLAKE2b-256 2e232f599d3a880932b875c6c59bd56c5cb7cc7033d9a1669b130941fa65b38d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fde8be6d64e72cf6a2ee38b8121787e6c34caacf07a01a5887306f5e266ac0d
MD5 07a11cd5ca9a29604ede5df683daf034
BLAKE2b-256 1dce0f21e793b3044b841885e87c9439ce6ec00dd7a25c72ca5e237162e63e76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quadrants-1.0.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-1.0.1b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6e02651d435d3397edd36f91fc9a9abe228f92d81ac023c9e8cce0c7eded0b74
MD5 60e7ccb07e176828db1c2d8e6446efcc
BLAKE2b-256 0199895887148f77e42ee74839e0526483450ba15dc2048b5965c853ccf91acf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a8d33d25ebcc53aecbd94912d440ff50b6de17fb759ee469b6528cc0dde30b2
MD5 0c60825ec8bfc6060cf3784b80e14845
BLAKE2b-256 c5db89c4ff097be662a60df8818b343c220a26af57255c4b8cd0427e8f693659

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 1d9b5c135e093e5e1a5aee4803be33e3c77dcc62469830b6451a9a04bfcc7593
MD5 aa262be52cbe591d44eebe47f752433a
BLAKE2b-256 39411bd245d7f52d66e77f38c9a78a47e93ba6ab7a6894066be89138a10a6ce2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.1b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a67550f270bda0ad937a6ac9956aff25972cc1f97bf45a5c4951e62ae867ef49
MD5 cfc49e044049e5b400677b5c984e5a76
BLAKE2b-256 c93f095af9fa9610144bc85fdde86ec31ce2cd0d6c4ae3d64f550e587b29d421

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