Skip to main content

The Taichi Programming Language

Project description


Latest Release downloads CI Nightly Release

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

Event

Voxel Challenge 2022 is open for submissions until 18th May. Find out more here.

Join our discussions

Report an issue

Contact us

Reference

Demos

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.4.1-cp310-cp310-win_amd64.whl (28.2 MB view details)

Uploaded CPython 3.10Windows x86-64

taichi-1.4.1-cp310-cp310-manylinux_2_27_x86_64.whl (32.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

taichi-1.4.1-cp310-cp310-manylinux2014_x86_64.whl (29.7 MB view details)

Uploaded CPython 3.10

taichi-1.4.1-cp310-cp310-macosx_11_0_arm64.whl (32.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

taichi-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl (37.1 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

taichi-1.4.1-cp39-cp39-win_amd64.whl (28.2 MB view details)

Uploaded CPython 3.9Windows x86-64

taichi-1.4.1-cp39-cp39-manylinux_2_27_x86_64.whl (32.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

taichi-1.4.1-cp39-cp39-manylinux2014_x86_64.whl (29.7 MB view details)

Uploaded CPython 3.9

taichi-1.4.1-cp39-cp39-macosx_11_0_arm64.whl (32.7 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

taichi-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl (37.1 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

taichi-1.4.1-cp38-cp38-win_amd64.whl (28.2 MB view details)

Uploaded CPython 3.8Windows x86-64

taichi-1.4.1-cp38-cp38-manylinux_2_27_x86_64.whl (32.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64

taichi-1.4.1-cp38-cp38-manylinux2014_x86_64.whl (29.7 MB view details)

Uploaded CPython 3.8

taichi-1.4.1-cp38-cp38-macosx_11_0_arm64.whl (32.7 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

taichi-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl (37.0 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

taichi-1.4.1-cp37-cp37m-win_amd64.whl (47.8 MB view details)

Uploaded CPython 3.7mWindows x86-64

taichi-1.4.1-cp37-cp37m-manylinux_2_27_x86_64.whl (32.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.27+ x86-64

taichi-1.4.1-cp37-cp37m-manylinux2014_x86_64.whl (29.7 MB view details)

Uploaded CPython 3.7m

taichi-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl (37.0 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: taichi-1.4.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 28.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for taichi-1.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 905803acc5f4260e6e7a521f1ecbc7c9529efa847d27a91e2e3dd6513e923bb9
MD5 e0eab16f00318b4dd8e4742abde8aea6
BLAKE2b-256 b7ce9757572c299d007b6565873066aedef63bf8e13d46af96381d8ae32465a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2e36e4b4d5454ede6a545d157e7199bb0ce58df45a72747df2cfa4c76673df9d
MD5 88432e13e6cdb7ce1f8baa2618f8a083
BLAKE2b-256 73f98c75cf6af4bafbd31b87b18d24fc02ee0c0edd582e3523f393b5313cac10

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a13d07e958ad4e26ce4b695d819cc97dbb8a9fbb2d1d0af38f22a10a2cac4c35
MD5 216a262d130f91e7397c41afd1bc90dc
BLAKE2b-256 396212f0f518293dbd9237e8df2b2686f51abb3700c8e6673e551e60b0763107

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b41d7fe316e68aa26aaca1d3fa8118138a1f21ef81a351e9c1f93cc31364ced6
MD5 f895df220b59a56ad97c879996dd4b27
BLAKE2b-256 94e93b274a8a0634a72c7fb5704cbb9a3fb149a69b1be82bbc27378e0439551d

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 70209db88fafa91c47eb8fd8223567de9fe039d9421559191e15c0e52292660f
MD5 3afc428fe7dcc4f8d0c6274b467051a6
BLAKE2b-256 2df2f065d39f0c0ce975e8f41c6f1c46ef856e6422185cc5c4a22c7eedf47ece

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.4.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 28.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for taichi-1.4.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 effa8a31ae4112a04e88e224a0c0066b06e1d89f48441449ca8ccd0f9994a3d1
MD5 a7d5fc24b02582a5b5483ed890027440
BLAKE2b-256 916d4e97f3f2e448336e80f6a7127cd47092479747a30f6e0a7ad2754b4d9116

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 8f783cc066a4b692694175d2b7574813eb25088ec5984f28b4b085996da3886f
MD5 c49b3d7d001493568a3257d729f32660
BLAKE2b-256 77f5c25ca3b235db7a62e65b0d7312d4e93956eab9438386907ad28e4957c9ee

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa1fd3674c687cc51dfd6e69f89c7ab4a76874bd67137585a01a1b702a126353
MD5 30344f35f7bffb825d87ff70f8a48a4d
BLAKE2b-256 7bc255a498c3886587f8e77138e82bceda7fc608916376283dbb78a8a6b2e1d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3c1d2e0ed27706e23d5a3516b3defbfd55d293018e1c77b1c138b2e3d564182c
MD5 417f31fe983443b9cc4f6968d2706612
BLAKE2b-256 bcee9bb314914d341bc04d65cae74cbcdfd2b41df06fa11f4062db8d70f8a4ec

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e64cea04ccf0f8830edc070b2aba13cd4baf80da4a97467fc524318eb454e912
MD5 74866919337674abf54ea9cc249f7c92
BLAKE2b-256 896e6c6c3184470a295736aa87a2459e2abbaadac9d29568e7cc433c64029e60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.4.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 28.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for taichi-1.4.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c1255c2e52aa55b9fdd4c63f7f9b08ec22b37388a1f68a917de8f3fdd1bbe767
MD5 e4919b54a30dc20e2dd5203fb4eb9698
BLAKE2b-256 fc7889da767e400dabf83b1d5e29a7c8d5d48baac92381c7c4f79d9605b46faf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6e5df2c0f4bfbb98a3ba3dc99ecad7e7927f011a4d4fc360b5ad91cdd333b9c2
MD5 81631c92cc63e246f34f61b7e76ff009
BLAKE2b-256 aa29781a74dd3bc6807fb86490da30781f2b5e1127cad8a8f7eeca67b1382058

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b041aef2701e5ca24a94edf77d31d68c40260906181e7a980b73f453732de39
MD5 42152ce59cb4a391aad4c17a744b1afd
BLAKE2b-256 24f8671bf42283eb2fb21e3be1a6b98ad97461df2527da81f734ccfd167df1da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38617ef3635e32ee4982410a68be4d6d45fa383a36726341fbe661932d15d407
MD5 1542c78585609814604aa0928967fa43
BLAKE2b-256 e29927a85b0a46096ae88489dd27d03088c7680070439f41cc036fc7f40fdba5

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 746b73760535f154188ffff0b00539604d3a98a1d630fdbcccb452857d1c7b71
MD5 e9c5fb1a7c4bc7aebb97bc18dcf9a76d
BLAKE2b-256 b1872974a527f184920af680e77a4ebe7b3acfdae8b45550d9301058cf017270

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taichi-1.4.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c3f821abff16508efe01363498217409e47e3f66527bba4524a80da9550a0e60
MD5 7f354bc7ab8abbc35c911d8afc0e791d
BLAKE2b-256 3c5258250ffb2dc45e598dc3b5e7bfece6409ba1b4cd180a6e6e73025f841628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.4.1-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 bfc8d499bc9e4b1cf83a7ac66c0e7c18b5e61444de7ec1603ba0f280747fb3bf
MD5 27ca215c361dde4dac05fa017a3b6001
BLAKE2b-256 0f02680ca9d424d745a7e2833d6ff6167ec226c53280ac0f2dd5831aa948c8fd

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 271451c447ef3ea18c33c9ee3d33b76a7b2b0424bb270f8af7fbcf24d07c31d1
MD5 6eac9fa89a6d31099f9721b549f23d76
BLAKE2b-256 30c7b6a9ea6c40587d59679cf90ce6dbe975446e7caa999de08b3ef5931941f0

See more details on using hashes here.

File details

Details for the file taichi-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e70b6e55590af184a013085314fb7fb41b12676f02b273178761c21a092e9aa5
MD5 fdb9d822971edb1bddbce0f4ce0038df
BLAKE2b-256 3572bef76fa4f88476344bb0eab4afdb2416d79707284362ad2a66f7173b3082

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