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, numberical 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 nighly 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

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

Uploaded CPython 3.10Windows x86-64

taichi-1.1.2-cp310-cp310-manylinux_2_27_x86_64.whl (55.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

taichi-1.1.2-cp310-cp310-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.10

taichi-1.1.2-cp310-cp310-macosx_11_0_arm64.whl (23.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

taichi-1.1.2-cp310-cp310-macosx_10_15_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

taichi-1.1.2-cp310-cp310-macosx_10_14_x86_64.whl (22.4 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

taichi-1.1.2-cp39-cp39-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.9Windows x86-64

taichi-1.1.2-cp39-cp39-manylinux_2_27_x86_64.whl (55.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

taichi-1.1.2-cp39-cp39-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.9

taichi-1.1.2-cp39-cp39-macosx_11_0_arm64.whl (23.6 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

taichi-1.1.2-cp39-cp39-macosx_10_15_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

taichi-1.1.2-cp39-cp39-macosx_10_14_x86_64.whl (22.4 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

taichi-1.1.2-cp38-cp38-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.8Windows x86-64

taichi-1.1.2-cp38-cp38-manylinux_2_27_x86_64.whl (55.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64

taichi-1.1.2-cp38-cp38-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.8

taichi-1.1.2-cp38-cp38-macosx_11_0_arm64.whl (23.6 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

taichi-1.1.2-cp38-cp38-macosx_10_15_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

taichi-1.1.2-cp38-cp38-macosx_10_14_x86_64.whl (22.4 MB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

taichi-1.1.2-cp37-cp37m-win_amd64.whl (18.9 MB view details)

Uploaded CPython 3.7mWindows x86-64

taichi-1.1.2-cp37-cp37m-manylinux_2_27_x86_64.whl (55.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.27+ x86-64

taichi-1.1.2-cp37-cp37m-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.7m

taichi-1.1.2-cp37-cp37m-macosx_10_15_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

taichi-1.1.2-cp37-cp37m-macosx_10_14_x86_64.whl (22.4 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: taichi-1.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for taichi-1.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fe5275de1f75150e80a5995394b6d325c7706b2ccc502408646a4d3f6f33185f
MD5 a7a22eeb71cc85b71c46f9a6e7aca3d1
BLAKE2b-256 02a5c27ab85cb5c534077e93de8831048f68e918ef2ac857c8fa323ce4141e95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 67a325ec2fd5024175ebeb7f3d0e8bc782d0cdd1f67af499725685b35307b221
MD5 0231dfc928919ccca695dacfbcad3dda
BLAKE2b-256 a2056968a3214be744b04de9358b36e8efd6d84d2a80090b9423d9ffdc421f71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da6a4ad5954cbfbb6ba48defece1302ee18aad33065245916ada514cc52e4b26
MD5 1b95b17b1f6e81fba5213caf37c3dc69
BLAKE2b-256 0379ee27774b162fb3c69a3bf8d84c41b22ded8bbcb8cf6874c99b65370cb894

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 32754da185ef630c254f73f4bc6dfe92a0d5fd629098b0f105cc65d59576a18c
MD5 e87fede6a63fe8572e08ec67114de779
BLAKE2b-256 27ffdbdafc93d6fa33fc95796dd8dc104dcf1a240bad5ee6217ca7b789358870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7fd15f8964a6a487df7761991bf6c484f8a0b718c88b0f2bfa3c2912cd30f216
MD5 1f3e044f18b1db4f8c20e73be7bd890c
BLAKE2b-256 29425c0448c35549ae692882a0dcc731d5c11b594c639be430cab9a1da237922

See more details on using hashes here.

File details

Details for the file taichi-1.1.2-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.1.2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2c2ec7c752a35002ddfe51c6602d9016b3b577428b24ba7c9e4b189c8475ea7e
MD5 fb137de58b2f85917e11b920cc4b430c
BLAKE2b-256 63b8d0f7ea4a9b1306eb49f30cecb42cb01d78efc75b3d13034107a0e571d3e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.1.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for taichi-1.1.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 71818910d1c51409cd1f806dae7d5a530648e941499232d6c15cb610355acd98
MD5 732472ccf4a7b3271d3dcbc2f24cd33a
BLAKE2b-256 7c1612535921dd0eed4159f0730b14141291d42dac1b0460eecf87e9f1b354ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 68aa8f0703d35f6e90dd5bc33a812c06d4d5dd307c2a41e727e8233e468a940e
MD5 9c7883098052cd437b44a0be1775ffd9
BLAKE2b-256 e195a21a8d4d9735c1f2a9a151265f26b51f298acc940192fa35757d2daf1c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a01a2631fec90cb5ba6e1398e69430bf53f09ba37c78fdf93e4d6a4dd0abf277
MD5 4a8bb6d55dfaae3954ca7fabe28b1d5e
BLAKE2b-256 4eee5f994f5483c5d597b06f83f9f291c31b07d94012bf26312e9650b42fff18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bab9da4a89d584456819fa704c548b78e15bd6ac70902344e5c10b139d5ae19d
MD5 ead88ed4dbe8e048d10d2c01b8045dff
BLAKE2b-256 6f5ee92847b8907e7cb772dbd9cc9009098330e4371db50f46c060795524e715

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ceafcaab1b2a63fedbc09608a3ad112a097e2a3209cac5a1d3331a8928d26154
MD5 6e7730727202c3ae784d3302c1741ce6
BLAKE2b-256 13039305192382affc18589ee143e5be6a791cf7dc362e467a1e1da855086170

See more details on using hashes here.

File details

Details for the file taichi-1.1.2-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.1.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 10516ec386189416e20ea54179a5aafa31afb7c1e7ac55ee7084630285a81205
MD5 617858f1fb6ecbd1871c27446ffe8024
BLAKE2b-256 26c8114eb320c9f57dbfc1db215670de7a0b09a7c016803fc61b1f562b11fa35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.1.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for taichi-1.1.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3bc9c9253af2f59b248dde279fd6fe3f2a983630bfec5df0cead38f2c5cb824d
MD5 167a8b2cf96bd84b861aa821328500de
BLAKE2b-256 62074e1ad51fe56b5545993581bf5e37c4c173dc2caf32211ff55dfee6518ea1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 024d6d559d6273f2f9c4305acb8fa6eada69c6c30fce96c206623fb575c0f3bd
MD5 6c62b4e4d81fa298987ae6026787f202
BLAKE2b-256 544efdcbd6bfcb6d7ab490609ded722384edf7513a8100b530b941cf8a3c49c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f8098aa25b1b59cd31e707cb8f892be98fa35e7090f66afce97aa4c953687a0
MD5 d35067165cb2898232f7902df280b374
BLAKE2b-256 87ea7c9451005ac8955721122d4fb6c9676db11e6debf6725d6341275ece58cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f13c084da32a1a75c911952348280d6d8de1d346e6ad7d8d805b5c0e9f03916b
MD5 a5fb1d85f4ff720354eaf9071da3be3a
BLAKE2b-256 eea3ee3344de30062970bdb7b55842aeb113d162fb274733bfd469bef198ce5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 dd4ab18fd21ed5bc0c205d78e07673230064832293b9582cf48ef42bd4d6d027
MD5 bd431eca8b47ccee1b7c971f80fc151e
BLAKE2b-256 c06d433ebcd39b8a3e5908f437f8ce4ab6c82dfd6715e63f87f8cffbea2df204

See more details on using hashes here.

File details

Details for the file taichi-1.1.2-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.1.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 1d2db41eab50b87dc62f0471166764d591edf3e74e1f9ce3de7f9637e1153012
MD5 42e86dbf30ec11d31522dd5e7aa4bf18
BLAKE2b-256 5a3d7168f6d89521853c40f2baa22b66bf5529a2c5393437cdccab56017aba62

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taichi-1.1.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 91b4c3fbb562b52ea4de5a83d10f8043315ced48d9f11a5a06fd27b06a2356cc
MD5 4fb37952ebb93ba0f0aedad0ae27d56d
BLAKE2b-256 fd33a4284c5379518db25b0e4802685959d93f5f39924bf0c59553a2d67debed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c53124b90a524905b25e2108929ae7f7721ed134a369b32053c529a2ce9969e5
MD5 334dbb4c7574bb2b1de90ee605af9eaa
BLAKE2b-256 a6bdd692f40bdb4d241c9057d66dcfb6821ccaf504566bda96fd0ed7e0d44326

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 842d351409f0d423842b97ca013b349036012cb8e93915465d320105b793e75e
MD5 b475574a8b90fd0f760f4881198d3f7d
BLAKE2b-256 2b1df8131cb2ced96d77d749d78e54ec26d8151e8a09fed0e48978f7242b6866

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 14fd7c540bdf43df10fd92f480f344e6890f8b6ebfaeebe82c97710ccb42ab1a
MD5 1949ca99916bead25b14d13498d2123a
BLAKE2b-256 2cd049bdb82a5ebc9d3af9454498014c95a4c90a48edd61196f5092a81bfbe16

See more details on using hashes here.

File details

Details for the file taichi-1.1.2-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for taichi-1.1.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 47af2736d37891b28c540226119226ea05736d50c372771bbf6a054ffbaa1c81
MD5 faeae290243e556e46f63b3e879e7efc
BLAKE2b-256 507157480a00fc3e3dea693ee2ffb4f583ef59106f88ca240a307c7c6b99c2fa

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