Skip to main content

The Taichi Programming Language

Project description


Latest Release downloads CI Nightly Release discord invitation link

pip install taichi  # Install Taichi Lang
ti gallery          # Launch demo gallery

What is Taichi Lang?

Taichi Lang is an open-source, imperative, parallel programming language for high-performance numerical computation. It is embedded in Python and uses just-in-time (JIT) compiler frameworks, for example LLVM, to offload the compute-intensive Python code to the native GPU or CPU instructions.

The language has broad applications spanning real-time physical simulation, numerical computation, augmented reality, artificial intelligence, vision and robotics, visual effects in films and games, general-purpose computing, and much more.

...More

Why Taichi Lang?

  • Built around Python: Taichi Lang shares almost the same syntax with Python, allowing you to write algorithms with minimal language barrier. It is also well integrated into the Python ecosystem, including NumPy and PyTorch.
  • Flexibility: Taichi Lang provides a set of generic data containers known as SNode (/ˈsnoʊd/), an effective mechanism for composing hierarchical, multi-dimensional fields. This can cover many use patterns in numerical simulation (e.g. spatially sparse computing).
  • Performance: With the @ti.kernel decorator, Taichi Lang's JIT compiler automatically compiles your Python functions into efficient GPU or CPU machine code for parallel execution.
  • Portability: Write your code once and run it everywhere. Currently, Taichi Lang supports most mainstream GPU APIs, such as CUDA and Vulkan.
  • ... and many more features! A cross-platform, Vulkan-based 3D visualizer, differentiable programming, quantized computation (experimental), etc.

Getting Started

Installation

Prerequisites
  • Operating systems
    • Windows
    • Linux
    • macOS
  • Python: 3.6 ~ 3.10 (64-bit only)
  • Compute backends
    • x64/ARM CPUs
    • CUDA
    • Vulkan
    • OpenGL (4.3+)
    • Apple Metal
    • WebAssembly (experiemental)

Use Python's package installer pip to install Taichi Lang:

pip install --upgrade taichi

We also provide a nightly package. Note that nightly packages may crash because they are not fully tested. We cannot guarantee their validity, and you are at your own risk trying out our latest, untested features. The nightly packages can be installed from our self-hosted PyPI (Using self-hosted PyPI allows us to provide more frequent releases over a longer period of time)

pip install -i https://pypi.taichi.graphics/simple/ taichi-nightly

Run your "Hello, world!"

Here is how you can program a 2D fractal in Taichi:

# python/taichi/examples/simulation/fractal.py

import taichi as ti

ti.init(arch=ti.gpu)

n = 320
pixels = ti.field(dtype=float, shape=(n * 2, n))


@ti.func
def complex_sqr(z):
    return ti.Vector([z[0]**2 - z[1]**2, z[1] * z[0] * 2])


@ti.kernel
def paint(t: float):
    for i, j in pixels:  # Parallelized over all pixels
        c = ti.Vector([-0.8, ti.cos(t) * 0.2])
        z = ti.Vector([i / n - 1, j / n - 0.5]) * 2
        iterations = 0
        while z.norm() < 20 and iterations < 50:
            z = complex_sqr(z) + c
            iterations += 1
        pixels[i, j] = 1 - iterations * 0.02


gui = ti.GUI("Julia Set", res=(n * 2, n))

for i in range(1000000):
    paint(i * 0.03)
    gui.set_image(pixels)
    gui.show()

If Taichi Lang is properly installed, you should get the animation below 🎉:

See Get started for more information.

Build from source

If you wish to try our experimental features or build Taichi Lang for your own environments, see Developer installation.

Documentation

Community activity Time period

Timeline graph Issue status graph Pull request status graph Trending topics

Contributing

Kudos to all of our amazing contributors! Taichi Lang thrives through open-source. In that spirit, we welcome all kinds of contributions from the community. If you would like to participate, check out the Contribution Guidelines first.

Contributor avatars are randomly shuffled.

License

Taichi Lang is distributed under the terms of Apache License (Version 2.0).

See Apache License for details.

Community

For more information about the events or community, please refer to this page

Join our discussions

Report an issue

Contact us

Reference

Demos

AOT deployment

Lectures & talks

Citations

If you use Taichi Lang in your research, please cite the corresponding papers:

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.

taichi-1.7.4-cp313-cp313-win_amd64.whl (83.3 MB view details)

Uploaded CPython 3.13Windows x86-64

taichi-1.7.4-cp313-cp313-manylinux_2_27_x86_64.whl (56.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

taichi-1.7.4-cp313-cp313-macosx_11_0_arm64.whl (50.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

taichi-1.7.4-cp312-cp312-win_amd64.whl (83.3 MB view details)

Uploaded CPython 3.12Windows x86-64

taichi-1.7.4-cp312-cp312-manylinux_2_27_x86_64.whl (56.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

taichi-1.7.4-cp312-cp312-macosx_11_0_arm64.whl (50.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

taichi-1.7.4-cp311-cp311-win_amd64.whl (83.2 MB view details)

Uploaded CPython 3.11Windows x86-64

taichi-1.7.4-cp311-cp311-manylinux_2_27_x86_64.whl (56.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

taichi-1.7.4-cp311-cp311-macosx_11_0_arm64.whl (50.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

taichi-1.7.4-cp310-cp310-win_amd64.whl (83.3 MB view details)

Uploaded CPython 3.10Windows x86-64

taichi-1.7.4-cp310-cp310-manylinux_2_27_x86_64.whl (56.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

taichi-1.7.4-cp310-cp310-macosx_11_0_arm64.whl (50.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

taichi-1.7.4-cp39-cp39-win_amd64.whl (83.3 MB view details)

Uploaded CPython 3.9Windows x86-64

taichi-1.7.4-cp39-cp39-manylinux_2_27_x86_64.whl (56.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

File details

Details for the file taichi-1.7.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 83.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for taichi-1.7.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ff9847a788c2193df61626266eb2df2ce679c372cb1669ffa806e7c45722ddc7
MD5 f58dc322dac71c30e98a9562308ce583
BLAKE2b-256 10430f4eac57b2eaee9e906139794eb12e752a7f8d077bbd1be695acdc9d117c

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 001ff64725e58e25ff832facc4ff1ed5ded968c64d5cd46275795999f1cce4e0
MD5 bbcd3cc4b2c5b0152aa7bcef2a967dc6
BLAKE2b-256 81cd3858352ede95ad71a8bec677da440011b42df0214ee675a3dd3f0dea607a

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a907fc86029c4b5ba85352a77f48af14717711466def8d6d2b8b17d75311c30f
MD5 97522e289ca0b1b8bfd1f550111b156f
BLAKE2b-256 93627a5c8562550e17054ea59e41de9b82680f19b5e45442f6967f442aeb8e60

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 83.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for taichi-1.7.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d078481d84032d9284a12a0b78672a4a2915786d9106791fad657c09352e9565
MD5 74ac37a41ff2185ab387218847c26195
BLAKE2b-256 27325882f3fafbd981fe060c7ee96355161b82c78e7624a4460eefaf2760ea64

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6f1303aedae3ea25e33cef5f30259fc2f66c7f0287433c4e31bdb25fdcd4d81e
MD5 f55f44d07be6eb0787c9488c57e20ef9
BLAKE2b-256 7474c7aca2af38d38efe9ad8430864e97e87c0b0d4affa2ea6cc4aecbbcfdb0e

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c7d188f8a8a15f07b197aa881517ffc7459663ee25a0e36636ce347c0649353
MD5 814301a890fd07dca83dd4352ee0da59
BLAKE2b-256 ef5b7c7d6b8259fba064a4b3908f67f2488efbc3104d2a2fbaba00d81d30bac2

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 83.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for taichi-1.7.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 767d977f077efcc83eb746a8dd1ccd196db782f48eac07c495922b36f8828e2c
MD5 63a69cba401fa01876c3b7953fcf0060
BLAKE2b-256 45350495da9f8f0afa801a8e2da262fb75814bf9a4d788946c40bfc9340bf088

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 5c3c1624daeb1554c1a2b6ee9f9b8398bd8392d7f89fc65395f94baecf049f89
MD5 6af0be7f673d108c11753a3d0c84c613
BLAKE2b-256 bcc690b110c26588e9c8f1f71d1485b176e547b581075102d54aeb38d2e48ae4

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cbb5a16cac228862c5da2ec71ef722e637c7a5ebf636f8f11000c2f8a9b6693
MD5 42d71bc38faf831a6c47b1ce543b64d3
BLAKE2b-256 23893a920b880e058b4d8c5b0fe1e695481725707aab5ac35b3e91295903dda0

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 83.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for taichi-1.7.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0cd550e5f91429b6078872d1d4d366a6257c3e50171c6eed21fa4e9801810f6e
MD5 fdcf408c968b391e580d8c6e91c75685
BLAKE2b-256 5cb2c576be78f77759c14aa839aa650d177b880467da9da3907245668e070209

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 42ffa0ba20b19e8695894cc4796ebefaed11cc10a1ac3704bd48a9ddfd54436e
MD5 ddc87ed7afd653d9d5d6124e45fa744d
BLAKE2b-256 9cbd7c4bf1412555c69276f5d28a786f1023079bf32947c6591719d3ecc43713

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e44e74d3def16bda5203722a94d63cbbc3d04b2e0bb9d5dd7527f884c9c9a9a
MD5 6fa724addc9ac9975030fd50743bf09a
BLAKE2b-256 32aec9f15c432ed2424b11c7ada880bff577a51e860be20b083df51312963e2c

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 83.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for taichi-1.7.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b7d5c9b39f6bbc34a6ed7118394010c02fb6f0aebe9dc3355d3fe08b36d99720
MD5 b0a424556e108410b2a3ac0de8a6c3e4
BLAKE2b-256 5e8900ae95acdee11ec511afb3605d2a3a84d1f3b1aefa371215d92ec418a24f

See more details on using hashes here.

File details

Details for the file taichi-1.7.4-cp39-cp39-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.4-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a6751f395fb6dcf56a47c1180f8d123bd92fd8bb5e921a891556eaee4ebb4ee9
MD5 48994630b1ba4fc0100a2d11b9d06c7e
BLAKE2b-256 07a67b6ecdd6c44f5c424d8a9542d7a4daf2bedc866a917a43e3f1be6c2e3e34

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