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 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

taichi-1.7.3-cp312-cp312-win_amd64.whl (83.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

taichi-1.7.3-cp312-cp312-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

taichi-1.7.3-cp311-cp311-win_amd64.whl (83.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

taichi-1.7.3-cp311-cp311-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64

taichi-1.7.3-cp311-cp311-macosx_11_0_arm64.whl (50.3 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

taichi-1.7.3-cp310-cp310-win_amd64.whl (83.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

taichi-1.7.3-cp310-cp310-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64

taichi-1.7.3-cp310-cp310-macosx_11_0_arm64.whl (50.3 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

taichi-1.7.3-cp39-cp39-win_amd64.whl (83.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

taichi-1.7.3-cp39-cp39-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64

taichi-1.7.3-cp39-cp39-macosx_11_0_arm64.whl (50.3 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

taichi-1.7.3-cp38-cp38-win_amd64.whl (83.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

taichi-1.7.3-cp38-cp38-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.27+ x86-64

taichi-1.7.3-cp38-cp38-macosx_11_0_arm64.whl (50.3 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

taichi-1.7.3-cp37-cp37m-win_amd64.whl (83.1 MB view details)

Uploaded CPython 3.7m Windows x86-64

taichi-1.7.3-cp37-cp37m-manylinux_2_27_x86_64.whl (55.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.27+ x86-64

File details

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

File metadata

  • Download URL: taichi-1.7.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 83.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b7d86a147ad7347c7ab9badd5f2b0c9abec1649fea819cc87870ca5d68ce9930
MD5 4c7017df2ae4d68dbb0f0f9256bd0587
BLAKE2b-256 76d73e77c37fb59703b23fa9a4285eb79cbdebf85588ade4baad536549f1496a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c5cdbd39b4b54a667a1c7aeba5214542e6ad87ad4c5c87c3efaf78876950903e
MD5 9a9a80cfb803be3699e776fc58b9a174
BLAKE2b-256 a029401598d7ccb0af91d63a7e191bab70e8dc82921bad9dd475a9b8ef462cb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bf069db8ad159e8f0775b9478399ea8a120a9b4cff3f8b385a6e68fd84295917
MD5 5e41ceb3df4a7ab34ce92d7efa624218
BLAKE2b-256 e3c3cffb1a58fdf4073ea3559e3661252bfd0aae22caeefda9212705e89d73ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.7.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 83.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 589539b43fc45ff473c5a355d0da59f66fc87996b487d2e0de81cddab232b065
MD5 247b0565bafa9fdd73f1a5711e60823f
BLAKE2b-256 25a119eb48729df2cac0b5ae7d636485683cb4dab7af76e47977987ac1f7349d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 017fe653bdacda6d8bc98e520c7ba812beac9c0687b3426e043d44e7a928a941
MD5 fe73a748aeeec5ba3e5d466ebed43dc0
BLAKE2b-256 f54ffebddea17a122dc933b74ce512ee81b4bc00577f0940bd920925f1c30d48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d855c4c4dfc51183fac1e6335076526eceb354eb6a5e0122c89aa59d555586f
MD5 12c98b508b917af96a62aaa4c8679b72
BLAKE2b-256 0ff4459cab267b63cb5633623a1e14be311d114c03bae7024b874d21a7e1127c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.7.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 83.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 279cd858ea4bc3890b8b8dc636407993a0d20cfac516ef7c142c0061f135aebc
MD5 205f145337a002ff490649922b47fbee
BLAKE2b-256 a16eacbb3cf39be25e5e54c0f5bc09962f25595fba7e2d9e5278dc8d9449f143

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 9c005305f0bb40bb37fc6d1a2ae3bd998218acbf595fe135cf6c81431039a864
MD5 5b20c66ec141934f08d3be5d2f193cd1
BLAKE2b-256 bf922029f34338a4c306421b6b050572858678f7b9b95c503948f3f75bbcdffd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff35bc6e450a57df80d14e9614765ff20d2b40a3f3996c0f139509f5992f51be
MD5 eee3393388d9eca85fee81229e6dce42
BLAKE2b-256 ac531654f44d92029a86c9d7e00549e300fbada2920be12ee56cfc6a5d67ae43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.7.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 83.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 871368f44504d2b349c7be845bdebe54cfe2f01f907479aee4e1d07add310072
MD5 75a9d0deee77d9493ab08711712f4a35
BLAKE2b-256 9e1dcd0bc743b1b53ab45c7698038c3f7c39bfb5a46539e93baeb54b0c5ae38b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.7.3-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 e35eaf5c1ea10e248c6d7511e9e69ae779b90fe8624108df2335995d184281ae
MD5 5dcc3f9f329e82905a13cec6269e3703
BLAKE2b-256 0accca44ab542b404b6aa8bdcf3c53e872ed5d6387e959f1d5df1ceb5d1df1d1

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd8646677d06723180c13f36d4149f45e6ef550726e74e7f916b6dbea9926573
MD5 a64ebe934d08ed66dde4608292135a63
BLAKE2b-256 2fbbed27d629004416910c2dd3d93a68b394f5533aa8ecb316dc738c5b5f95a2

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 83.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ce49013868c48746e4f37706e894a0169a16c811940912cce638e27324443b92
MD5 3cb67ac96c9085a6b7a619e9f2053bc0
BLAKE2b-256 95df37cd18e379d2e044a93543c381a5785d92404deab35182ebc84631ba2da7

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp38-cp38-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.3-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 f1830de4dbb1a71b31b0768dd75887de6cf1c88ee83119f5086511fddcceaff4
MD5 23b4213593aa3650de51d18bfd435856
BLAKE2b-256 cd60f57dcae1f0e86d4ffa489ab19f7a6a3ab40a5988fee04fe25eb6b131787c

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taichi-1.7.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 250ac82bcb540ac06629892ad58f9c1aa6d93f64f1a67ca9c7e97b135ea25376
MD5 0c9a4904e130c099c47692b0db6b57ec
BLAKE2b-256 0eb52f656ff7f16fab04fc4b3ad926ed63e7daf03e6ae250ae43c00b4d2f2346

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: taichi-1.7.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 83.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for taichi-1.7.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 95cbf3db05f133211023c7b7d90ea3f2b1bd0d9df0a3c049c2db02f78e16b299
MD5 767cb314aefaf74d0f423a94c6dd2cd6
BLAKE2b-256 1b47a471181dc10a03f9e5bc8de6058d0589877f4946e0ae502c99bc3cc16a97

See more details on using hashes here.

File details

Details for the file taichi-1.7.3-cp37-cp37m-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.7.3-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 e165684100e7dff86f30432200da2bbd6a3972638002d8bb065c3ef8bebfcd1b
MD5 9c0e0132cc18751737561ca105ea218a
BLAKE2b-256 489e6155cca7c371409a14233c7d975ad23b57bc6e54f2e75df41e526bc1cac0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page