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

Uploaded CPython 3.13Windows x86-64

quadrants-1.0.3b3-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.3b3-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.3b3-cp313-cp313-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

quadrants-1.0.3b3-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.3b3-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.3b3-cp312-cp312-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

quadrants-1.0.3b3-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.3b3-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.3b3-cp311-cp311-macosx_11_0_arm64.whl (30.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

quadrants-1.0.3b3-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.3b3-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.3b3-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.3b3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f2868acfc0e230dd95fac823d96e3cb778acf8befdf0ef5985986340ab47a878
MD5 eda9893fe44d13f87e499a0774e30745
BLAKE2b-256 e015be1661d502773fd390669e33038f8f13c1f30040e5118b6b3b3c28df13c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a9c5515aa307d067dedbb4b9c8b6455eddaa29c001a267d54bdf77987faab7a
MD5 4bed4ccf6f02d9b53c8e7ab3e5ce6e0d
BLAKE2b-256 96219e4c58146081d0e46372252c82f91bde7b80f7d2ec82abe5088cf9c0d8b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 6b7fe39a5ca5244ca0bd573675813b0819bed27faf0827d79da33646b8399035
MD5 86ade575a50cbf00b55c8d3a9d0338a2
BLAKE2b-256 7909719469f6fcb88718cc0fa67bef5150ff3f40a28c61730f5e3aa11612813d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d39b0cacf29142a7dd2b27248f833ef4480b2bd94e7e734222916fd1abed4d0a
MD5 afbdfdb405b53a58b36a2771745c5003
BLAKE2b-256 c9f191d07a45269ce80422ea7001c59a3ba08636bc0f0c96efd3acd6dad497bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 250b07b09a0f74bfd96954a791618eab15edc91623d984ee89ab21eadf01ec55
MD5 2fdda69be9fa1143310fa1899447107d
BLAKE2b-256 647c971c74160d55bf7fbb6defed496cbc3340a9930d1c90f1eac9b196a44be3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e689615365a9a162f9d1e3f060adecd016d19cd601a8fb19e8838eb1711aecc
MD5 f607a70c20f1d31116bf490ff5f4d45c
BLAKE2b-256 9fdfb6398a48288e2b94ece946fd66c8cfbd59d7e4e6738e1a5914a69d2a7d25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2274b278ad7db7eaf0ca2bfacded6fa74f7a3804f81e340bf6e94f17395f8b72
MD5 e11095efaaa68a9639ccf0447a0b66ee
BLAKE2b-256 edad1eacf3485a2919dff0ef1dba859ad58149e04aedc8796b499d8040c5bc3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68db79f728e3c26c36d7e4dd3ac841a3ffc960d59b0151748f42e2dad0518800
MD5 6de8f509f8c02aaaf545b5978d62ec17
BLAKE2b-256 13f34a23be5d6762f2169339fc277202d7e0189f1bbbe55e6e1e864230924bca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 515f13dbf38a73c2aadf343efe17fd140e29f071b9ed87d04058f8a7fdf1eb16
MD5 b9a42b1fd641bbc4bdfb7c6140866ce0
BLAKE2b-256 c6ee7ea8582516e3298f044fe67c4abda2b15df45c19fe047396228cadeb9626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d4744545795d5d79b3db9553e3ee634e2e685dca9fdaa28795c9a6d4d2007b7a
MD5 ef9556a2261f0a6010aea528a2eacead
BLAKE2b-256 c08858e474c10d1d6f31c30cb61375b3df6f4c06e8d0276da7414f237fc41bc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 adf49696c39f7ea0a7445a263d0fe9b5786e5a667df0eeafbe6dc4a5c0572d05
MD5 ebb5d3c9b40b34f4d74a3958abd299d5
BLAKE2b-256 47b3ea3dff21334d2157ac0b52d0da86530736a2fc4f6476ef05b8c1ea9693e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b01abac4ee0a19a17c28249f186b4cb0bdb2895aacc2a900e5e252784d13704b
MD5 97369b82625830407a873902ef1be627
BLAKE2b-256 d417aa718d054b9b7f58f4e7c8ef426d9131b3762f1c1f8b7230dc1b1ca3a614

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7968238f9ecdacc2ac62567a8d69fc81b4824c8a8b12bbca6cefe1207ac86e04
MD5 4f8c87fc14e0dc9fcfbf38ad6daaeab7
BLAKE2b-256 a19faaf27b0007acf19a48411d6a2b460cc8c04bff79919bde9cfa15ed61ea43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9417b23a0af24a9ac76450f68909ad2856056a0e12eb6d36d3ac184d3030bd1
MD5 1a088935dff405f126671d2cdf05e666
BLAKE2b-256 027fb53a58af6161df6abd0633825b347c33075955a7c7439c375a8d37fa3ca5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 5e2bd6d2a8d172b03894bc07c63f442e468e7536d66f3b7a16abae4adf65f057
MD5 d9053240333a5c08e8fc1a8f88cfd380
BLAKE2b-256 eb9adb796d3a55f2e3c0b7c638a4dbb82b336ac98bd5c8acc4e37ddb5bd04bb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quadrants-1.0.3b3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9efc5e262cd785c6ec19152138d43a730325f62a782621340d157266acbd460d
MD5 972f8b7cf68e809c0f6d2bcfc6cb0053
BLAKE2b-256 703fb07ec802f8a9596a5fea2598dfe21fe9b75b79a1a1e2e145ddb844d2008b

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