Taichi Lang

New
License: Apache License 2.0 · Updated 2026-11-16
Evidence: Primary sourceVerified: 2026-11-1612 sourcesView evidenceHide evidence
Scope and limits

Verification covers the licence and maintenance state of the official repository, the release timeline, the PyPI version and Python requirement, the README prerequisites text, the performance claims on the project website, and the formal titles, journal issue and abstract figures of the DiffTaichi and SIGGRAPH Asia 2019 papers. Four facts were corrected: v1.3.0 was released on 30 November 2022 rather than 6 December, and v1.5.0 on 27 March 2023 rather than 28 March, both confirmed independently by the GitHub release record and the PyPI upload time; the 4.55x figure is the average reported in the 2019 paper abstract rather than a maximum; the website describes the billion-particle simulation as running on a single GPU with 80 GB of memory and as the world's largest-scale single-GPU particle simulation; and the quantised-simulation extension QuanTaichi has been merged into the main repository, with its namesake repository keeping only examples per its README while the ahead-of-time capability lives in the main repository's aot module. The entry previously used QuantanTaichi as the project name, and the body now uses QuanTaichi. The two-to-three-hour statement is re-attributed to the DiffTaichi repository README. Community blog figures, performance comparisons and gradient-quality discussion of differentiable formulations are outside the scope of this verification.

#SourceTypePublished / Accessed
1Taichi official code repositoryGitHubRepository2016-11-24 / 2026-11-16
2Taichi release record (latest v1.7.4, 31 July 2025)GitHubRepository2025-07-31 / 2026-11-16
3Taichi README (Python 3.6 to 3.10 and supported backends)Taichi projectDocumentationNot stated / 2026-11-16
4taichi release record (1.7.4, 31 July 2025, Python 3.9 and newer)Python Package IndexDatabase2025-07-31 / 2026-11-16
5Taichi website home page (billion-particle simulation claim)Taichi projectOfficialNot stated / 2026-11-16
6DiffTaichi: Differentiable Programming for Physical Simulation (arXiv 1910.00935)arXivPaper2019-10-01 / 2026-11-16
7ICLR 2020 record for DiffTaichiOpenReviewPaper2020-04-26 / 2026-11-16
8Taichi: A Language for High-Performance Computation on Spatially Sparse Data Structures (ACM TOG 38(6))ACMPaper2019-11-08 / 2026-11-16
9QuanTaichi: A Compiler for Quantized Simulations (ACM TOG 40(4))ACMPaper2021-07-19 / 2026-11-16
10QuanTaichi repository README (framework merged into Taichi, examples only)GitHubRepositoryNot stated / 2026-11-16
11DiffTaichi repository (ten differentiable simulators, implementation effort in README)GitHubRepositoryNot stated / 2026-11-16
12Taichi official documentation (sparse data structures, differentiable programming and AOT)Taichi projectDocumentationNot stated / 2026-11-16

The verification date covers only what was checked in that pass; it does not mean every figure on this page was independently verified.

My rating

1. Overview

Taichi Lang is an open-source, imperative parallel programming language for high-performance numerical computation, embedded in Python and licensed under the Apache 2.0 licence. It began as a research project from a graphics group and was first presented publicly at SIGGRAPH Asia in 2019. Its design premise is narrow and practical: a simulation or numerical kernel written in Python syntax should compile down to native GPU or CPU machine code, without the programmer leaving the Python ecosystem, and without hand-writing CUDA kernels.

This guide is written for engineers who need to decide where Taichi belongs in a physics-AI stack. It does not repeat the installation walkthrough. It explains the compilation model, the sparse data-structure layer, the differentiation machinery, and then works through the harder question: which problems Taichi handles well, which problems it handles poorly, and how it compares with alternative choices such as JAX, NVIDIA Warp, hand-written CUDA, or a classical solver.

The audience is assumed to be technically strong. Readers should be comfortable with continuous mechanics at the level of knowing what a material point method step consists of, and comfortable enough with Python to read a decorated kernel without a tutorial. What they should take away is a set of decision criteria, since the useful question is not whether Taichi is fast but whether the problem's data layout, time-stepping structure and gradient requirement match the language's execution model.

2. How It Works

Taichi compiles Python functions at runtime. A kernel decorated with @ti.kernel is parsed into an intermediate representation, lowered through optimization passes, and emitted as machine code through LLVM for CPU targets, or through the SPIR-V path for Vulkan and Metal targets. The compiler performs automatic parallelisation of for loops over fields, so the programmer writes per-element code and the compiler decides thread mapping.

The data layer is the distinctive part. SNode objects describe hierarchical, multi-dimensional field layouts, including spatially sparse ones where only occupied regions consume memory. A field declared over an SNode is laid out either row-major or column-major, and that choice can be flipped without rewriting the numerical code. This is the mechanism behind Taichi's original paper claim about decoupling algorithm from data structure.

Automatic differentiation is implemented inside the same compiler. ti.ad records a tape of a forward simulation and replays it in reverse to produce gradients, with the differentiated code path reusing the same kernels and the same field layout. This is the design DiffTaichi formalised, and it is why a Taichi simulation can serve as both the forward model and its own gradient.

Two deployment-oriented features sit on top. Ahead-of-time export turns a Taichi program into a self-contained binary through a C API, removing the Python dependency at run time. GGUI provides a cross-platform viewer built on Vulkan for inspecting simulation state during development.

3. Scope and Assumptions

Taichi assumes a specific shape of computational problem, and recognising that shape is more useful than any benchmark. The workload should be data-parallel and elementwise or stencil-like: many similar elements, each touching a bounded neighbourhood, with the loop structure known in advance. Simulation time stepping, particle-to-grid transfer, and regular-grid solvers fit this shape. Irregular dataflow with data-dependent branching, symbolic manipulation, or irregular gather patterns across a large dynamic structure fits poorly.

Second, the problem should be expressible with the layouts Taichi supports. Regular grids, sparse grids, and hierarchical SNode trees cover a great deal of physical simulation. Arbitrary unstructured meshes, moving-boundary geometry remeshing, and CAD-derived topology need an upstream mesh layer, and Taichi then handles only the field evaluation on that mesh.

Third, differentiable use requires a formulation whose gradient is meaningful. Contact discontinuities, friction cones, and plasticity switches produce gradients that are either undefined or unstable at the switching point. The DiffTaichi work itself discusses continuous collision detection as a remedy for gradient quality in some rigid-body settings. Taichi provides the tape and the gradient, but the formulation remains the engineer's responsibility.

Fourth, single precision is the default dtype. Double precision is available, with the usual bandwidth and register cost. Projects whose governing equations demand double precision throughout should verify the numerical consequences of the default before committing.

Finally, the practical assumption is a supported platform. The upstream README lists Windows, Linux and macOS, Python versions it still describes as 3.6 to 3.10, and backends spanning x64 and ARM CPUs, CUDA, Vulkan, OpenGL 4.3 or above, Apple Metal and an experimental WebAssembly target. The package metadata on PyPI states a Python requirement of 3.9 or newer below 4.0.

4. Getting Started

Installation is a single command, pip install taichi, followed by ti gallery to launch the bundled example gallery. A minimal kernel declares a field, decorates a function with @ti.kernel, and iterates over the field; the loop is parallelised automatically, and the field can be read back from Python or pushed to the GUI window.

A productive first project is a particle simulation rather than a synthetic benchmark. The upstream distribution ships material point method examples, and the surrounding ecosystem includes a maintained material library and an Houdini bridge. Running an MPM example on a laptop immediately exposes the two practical facts that matter for planning: compilation happens at first kernel invocation, so the first run is slow, and the memory footprint of a particle count chosen casually is large.

For differentiable work, the path is to write the forward simulation first and confirm it produces physically sensible trajectories, then enable the tape and check that the gradient of a scalar objective agrees with a finite-difference estimate. Doing the check in this order catches formulation errors early, since a wrong gradient in a working forward model is usually a formulation issue rather than a compiler issue.

For deployment, plan the ahead-of-time path early. If the simulation will eventually run without Python, the field layout and kernel structure need to be compatible with the export tool from the beginning, because the export path carries a narrower feature surface than the interpreted path.

5. Comparison with Alternatives

Against hand-written CUDA or C++, Taichi's advantage is engineering velocity: a kernel written in Python with decorators replaces a substantial amount of low-level work. The cost is that the compiler's choices about parallelisation, memory coalescing and register allocation are not directly steerable, and a kernel that misses a hardware-specific optimum cannot be recovered by hand without dropping out of the language.

Against JAX and other array-programming frameworks, Taichi keeps an imperative, loop-oriented style with arbitrary indexing, which is the natural shape of particle and grid codes. Array frameworks give a stronger differentiation story for dense tensor programs and stronger tooling for the machine-learning side of a workflow. The comparison between differentiable-physics approaches is discussed in the neural operator and physics-informed learning material referenced later.

Against NVIDIA Warp, the distinction is largely ecosystem and authoring philosophy: Warp is a Python-embedded language with a strong GPU-first, graphics-oriented design and a tightly integrated simulation toolkit, while Taichi stresses compiler research on sparse structures and a long-lived research lineage around differentiable simulation. Both are credible for GPU-resident simulation; the deciding factors are the surrounding toolchain and the deploy target.

Against classical solvers such as OpenFOAM, FEniCS and SU2, the comparison is between a research instrument and a production code base. Classical solvers bring validated discretisations, established convergence behaviour, mesh generators and industrial support. Taichi offers speed of iteration, direct access to the numerical kernel, and the option of differentiating through the simulation. A production engineering answer usually keeps the classical solver for results and uses Taichi for exploration or as a differentiable inner loop.

6. Benchmarks and Evidence

The headline numbers come from the project's own papers and should be read with that provenance in mind. The DiffTaichi paper, published at ICLR 2020, reports that a differentiable elastic-object simulator written in DiffTaichi runs 188 times faster than a TensorFlow implementation, matches the speed of a hand-engineered CUDA version, and is 4.2 times shorter in code. The companion DiffTaichi repository collects ten differentiable simulators and states in its README that most of them can be implemented within two to three hours. The original SIGGRAPH Asia 2019 paper claims that on x86-64 and CUDA, Taichi programs ran on average 4.55 times faster than hand-optimised sparse-computing baselines while using roughly a tenth of the code, with baselines spanning material point method, finite element simulation, multigrid Poisson solving, realistic rendering and sparse convolution networks.

The project website additionally reports a one-billion-particle material point method simulation running on a single GPU with 80 GB of memory, described by the project as the world's largest-scale single-GPU particle simulation. This is a project claim rather than an independent measurement, and no configuration detail accompanies it in the public material.

Release notes provide smaller, verifiable engineering data. The v1.7.0 release records that switching the Cornell box example from inlined to real functions cut compilation time from 2.34 to 1.01 seconds on an i9-11900K. The same release reports that dynamic video-memory allocation reduced the memory footprint of a 3D differentiable MPM example from 3866 to 3190 megabytes and a NeRF training example from 5618 to 4664 megabytes.

Community blog posts circulate figures such as order-of-magnitude speedups, sixty percent memory reduction, and per-frame particle counts. These are third-party reports whose measurement setups are not documented, so they are best treated as indicative anecdotes rather than as evidence.

7. Role in Physics-AI Workflows

The distinctive use is the differentiable inner loop. When a downstream objective must be optimised through a physical model, Taichi lets that model live inside the gradient computation instead of being sampled as a black box. Control optimisation for deformable bodies, inverse problems that recover material parameters from observations, and differentiable rendering for inverse graphics are the settings the original differentiable-programming work targeted.

A second role is data generation. A Taichi solver can produce large volumes of labelled physical trajectories, which is what training data for learned simulators requires. The SNode layer makes the memory behaviour of sparse particle distributions manageable, and the same code path serves both the production run and the dataset generation.

A third role is exploration and teaching. Because a student can write a material point method step in Python with a decorator, the barrier between reading a paper and running it is low, and the language has been adopted for graphics courses.

Within a broader physics-AI stack, Taichi usually occupies one of three positions: the differentiable physics component, the fast data-generation engine, or the prototyping sandbox where a surrogate or control policy is developed before being ported to a production solver. It composes naturally with surrogate modelling, and the relevant background on those workflows is collected in the surrogate modelling and numerical solver collections.

8. Limitations and Failure Modes

The first failure mode is gradient quality. Contact, friction and plasticity introduce discontinuities where the derivative is undefined, and a naive implementation produces gradients that point nowhere useful. The project's own differentiable work discusses this and proposes continuous collision detection as one mitigation. Teams that inherit an existing differentiable Taichi codebase often find the gradient itself, rather than the compiler, is the hard part.

The second is reverse-mode memory. A tape over a long simulation stores intermediate state in proportion to the number of steps, and a thousand-step horizon on a large field will exhaust device memory. Checkpointing and recomputation help, at a cost in time. The reported figures in the differentiable-programming paper note this linear memory growth as an open problem.

The third is debugging and error messages. Failures in compiled kernels surface as compiler diagnostics, and the iteration loop for a scientific user is slower than in interpreted Python. The v1.7.0 release explicitly lists improved error-message quality and coverage as a change, which indicates the state of the art at that point.

The fourth is release cadence and ecosystem maturity. The published version history moves from v1.3.0 in late 2022 through v1.7.4 in July 2025, and the step from v1.7.3 to v1.7.4 spans a full year, while v1.7.3 itself contains a single user-visible change. Feature work has largely moved to companion projects and to a separate commercial entity that grew out of the research group. A project depending on new upstream language features should budget for that cadence. The repository itself shows the same shape: the latest commit on the default branch is dated 30 July 2025, the project carries roughly 28,460 stars, and the separate DiffTaichi repository that holds the ten differentiable simulators has not been updated since 2023.

The fifth is scope creep. Taichi is a programming language, not a solver library. There is no validated FEM element library, no mesh generator, and no convergence-verification harness. Work that needs those must supply them.

9. Version and Source Notes

The published release history runs v1.3.0 (30 November 2022), v1.4.0 (16 January 2023), v1.4.1 (2 February 2023), v1.5.0 (27 March 2023), v1.6.0 (12 May 2023), v1.7.0 (27 November 2023), v1.7.1 (17 April 2024), v1.7.2 (22 August 2024), v1.7.3 (23 December 2024) and v1.7.4 (31 July 2025). The PyPI package reports 1.7.4 as the current release, uploaded on 31 July 2025, with a declared Python requirement of 3.9 or newer below 4.0 and the Apache Software License 2.0.

Two discrepancies deserve to be recorded. First, the v1.7.1 release notes contain a commit that bumps the Taichi version to v1.8.0, yet no v1.8.0 release entry exists in the published release history and PyPI still serves 1.7.4 as the current version. The bump appears to have been a version-string change inside the 1.7.1 line rather than a release. Second, the README prerequisites still describe Python 3.6 to 3.10 while the package metadata requires 3.9 or newer and the v1.7.4 notes add a Python 3.13 build and drop support for versions below 3.9; the README text is out of date relative to the packaging metadata.

The v1.7.4 notes also record an unusual pair of build changes: an OpenGL build removal and its immediate revert in the same release, together with an update of the memory allocator and Vulkan headers to Vulkan 1.3, a fix to a duplicated-allocation bug in the unified allocator, and a compiler pass that removes redundant control-flow-graph optimisation to fix a crash.

Provenance for the claims in this guide: version facts and behaviour changes come from the upstream release notes and package metadata; architecture and feature descriptions come from the upstream documentation and README; the paper performance figures come from the DiffTaichi and SIGGRAPH Asia 2019 papers and are labelled as the authors' own results; the community blog figures are labelled as third-party reports.

10. References

  1. Taichi project README, GitHub repository taichi-dev/taichi, language overview, sparse data structures, supported backends and installation prerequisites.
  1. Taichi v1.7.4 release notes, 31 July 2025, OpenGL build removal and revert, Vulkan 1.3 header update, unified allocator fix, Python 3.13 build.
  1. Taichi v1.7.3 release notes, 23 December 2024, accelerated compilation through improved key generation.
  1. Taichi v1.7.2 release notes, 22 August 2024, loop-invariant cache fix for dynamic indexed pointers, force-scalarize-matrix configuration option, NumPy 2.0 compatibility and CUDA stream selection.
  1. Taichi v1.7.1 release notes, 17 April 2024, control-flow-graph aliasing fix for matrices of matrices and autodiff comparison-statement type fix.
  1. Taichi v1.7.0 release notes, 27 November 2023, real function stabilisation, kernel multiple return values, argument packs, dynamic video-memory allocation, sparse grid helpers and ahead-of-time export extensions.
  1. Taichi v1.6.0 release notes, 12 May 2023, table of long-deprecated APIs removed and their replacements.
  1. PyPI package metadata for taichi 1.7.4, upload date, Python requirement and Apache 2.0 licence classification.
  1. Taichi documentation site, sections on sparse data structures, differentiable programming and ahead-of-time export.
  1. DiffTaichi: Differentiable Programming for Physical Simulation, ICLR 2020, arXiv 1910.00935, differentiable simulator performance and productivity figures.
  1. Taichi: A Language for High-Performance Computation on Spatially Sparse Data Structures, ACM Transactions on Graphics 38(6), SIGGRAPH Asia 2019, compiler design and sparse-computing benchmark comparison.
  1. QuanTaichi: A Compiler for Quantized Simulations, SIGGRAPH 2021, the quantised-computation extension cited by the project.
Tags: