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

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

Uploaded CPython 3.10Windows x86-64

taichi-1.2.0-cp310-cp310-manylinux_2_27_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

taichi-1.2.0-cp310-cp310-manylinux2014_x86_64.whl (24.9 MB view details)

Uploaded CPython 3.10

taichi-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (23.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

taichi-1.2.0-cp310-cp310-macosx_10_15_x86_64.whl (28.2 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

taichi-1.2.0-cp310-cp310-macosx_10_14_x86_64.whl (22.6 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

taichi-1.2.0-cp39-cp39-win_amd64.whl (19.1 MB view details)

Uploaded CPython 3.9Windows x86-64

taichi-1.2.0-cp39-cp39-manylinux_2_27_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

taichi-1.2.0-cp39-cp39-manylinux2014_x86_64.whl (24.9 MB view details)

Uploaded CPython 3.9

taichi-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (23.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

taichi-1.2.0-cp39-cp39-macosx_10_15_x86_64.whl (28.2 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

taichi-1.2.0-cp39-cp39-macosx_10_14_x86_64.whl (22.6 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

taichi-1.2.0-cp38-cp38-win_amd64.whl (19.0 MB view details)

Uploaded CPython 3.8Windows x86-64

taichi-1.2.0-cp38-cp38-manylinux_2_27_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64

taichi-1.2.0-cp38-cp38-manylinux2014_x86_64.whl (24.9 MB view details)

Uploaded CPython 3.8

taichi-1.2.0-cp38-cp38-macosx_11_0_arm64.whl (23.8 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

taichi-1.2.0-cp38-cp38-macosx_10_15_x86_64.whl (28.2 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

taichi-1.2.0-cp38-cp38-macosx_10_14_x86_64.whl (22.6 MB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

taichi-1.2.0-cp37-cp37m-win_amd64.whl (19.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

taichi-1.2.0-cp37-cp37m-manylinux_2_27_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.27+ x86-64

taichi-1.2.0-cp37-cp37m-manylinux2014_x86_64.whl (24.9 MB view details)

Uploaded CPython 3.7m

taichi-1.2.0-cp37-cp37m-macosx_10_15_x86_64.whl (28.1 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

taichi-1.2.0-cp37-cp37m-macosx_10_14_x86_64.whl (22.5 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

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

File hashes

Hashes for taichi-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 125f72b0833cb1cb17ec010b4928e917dcd2ed7457500833a79f635432814e20
MD5 0bb38bc0295dc53c431e41cb88ba5b29
BLAKE2b-256 e4972bb0f9e18faaaf357a379704774154fd44b6b6087959744ff108aee022b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 91470fb69bd694dec3adb4b08b237c603d22f10f4d9689f19532b02a89cddad0
MD5 85fe81d4fd271c0ae2995daa9d22e5f0
BLAKE2b-256 4eb14668d8fb8b983e3f97fd5f9f6991674f50c57483ffc4638b12963f8f1f8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d2c7e011d1bde5b730ac37a14bbf1192f589ae1e8e7691e6693d16c6321ead38
MD5 c3868f5410510fb39b73c6dda73958b9
BLAKE2b-256 fc069086e557f7078ce1a01d939fadd41ab7600bd5ca82c981dba7c3c5aa05b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ec568b99897ca3beabdf2b11a77bb13ed1720586a88bc46731d6c76f149ea632
MD5 f1b20cad099060ab45560f3132bd5210
BLAKE2b-256 bbb939aab873b3d0502e478a8631a5692608de6cc097b409afa45196abc96fb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d124a7a074dd223f07cca330c20ff415d653788a0dc6994c5c907d96b431ebfd
MD5 508f027da276741e49cd18da2db155c9
BLAKE2b-256 435257a3ac4670b83673d2a9e94ecc7c932fcdebc9823c3cce4ef471b1a0edb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d85490ffc5a0db653c9a71e8dabf17a8975ced54215bc01cc24ace2dd36fbc57
MD5 7988d3f3ff1b78d7728a354ddd160823
BLAKE2b-256 24faa08e8445b7a8d65d0be5a4fb1006674df39b8bfd4a916cc7d89d52b7425f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taichi-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b6d312706f7755c30553a8c02b205b8e898a655e831ec7f3d71a69b6c6e518ec
MD5 0a02b3c7b65d28aa91eac313b1bdcaeb
BLAKE2b-256 5c62ab76c9d6ed6b0ba9ba16d1ca37ecdd67e922c91cd49ec1d30b01bc8b27d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2357c340705a21cc9f3162f84c32f8e37f1dc4756bacf0e8b11c747f9e7a6918
MD5 e3f8924ff5c32493a9593b67f604f762
BLAKE2b-256 3056737735ae4c4812e4476932b6cedc2fd6ba0e4e928f61fffa5b3c37013588

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cf3c79692b327d764abd1dd59e7c9a0847fd84a8dad24d7e4db194f8d28d2c7
MD5 0fe4da0c6d888ab23699838bb2e8b00c
BLAKE2b-256 a42ecc1bf46bf7578fc0fdc9c2c0c31253a720e21b39b62d4969ea2f89f78129

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f517d2176aa11275af7f7819f39d96f8d4d8289174b033fff49ddd4aa03915d5
MD5 208d999fab99e5833750224df04c7b33
BLAKE2b-256 6bf427fcdc68d09cf7cffd06002204a27f68af5329432b80d5765f5b960d0651

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 30953642a91c3e75c6705db98004777628d010809eed71ce2b93fc50d8984e81
MD5 a8c6e22330f7bade88b47cb1d3b94cec
BLAKE2b-256 8efba60abafaf1b8540fc9633a7c288cf76fc6af3c1098b2f81c1834b3992b46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 683ea43f1df0d2a4b299b7a7d08d8486035d99f2c7bbf9a98127a28d9ab4fc77
MD5 f230049ab635dc556d814c16281ca2ec
BLAKE2b-256 97d78b32c2e22205fc483307efc169df7b3260aafc721c8cbac57305b6b81f63

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taichi-1.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7c8ac8f75e6286f20d59eb1c9682ceedf115a71a18b203808def3fda38b00668
MD5 c2bed8246b55dd3c4f14241479b7feee
BLAKE2b-256 dfea35b69a7b4c6a77441abbbe718018e0ff5c52addc2910a1a985b8720ca0a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 3650168cba2e30f02eafd5ed0648666c8bd63e80ef382625ab550446bc17c762
MD5 5ec63e06468837943e5e5f149dcab5ab
BLAKE2b-256 b1f872433def84472b29620f3e09ea034bb3055f1b611b2894344bcd5d7bb3e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27f3361a7a15109121910d6fd4b2ba28e60876bd55342b055ebb186ab2faa2df
MD5 14a2683253bd6812769f6b8be69976d2
BLAKE2b-256 f96734c8185b6607f0f8add663a991f768ad675fd763f37316d1b7df623a47e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a7f5b9a8c33289ace2f03650a6cba2bde8a97667bc46094f6a68dbc9a1a0332
MD5 e2e85f2721c2f87d03cab824ab5a8d80
BLAKE2b-256 5176460eeb1c8947c68347063b32c516242d70d3299df3c2aa63d0465bdae600

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 11760ba95ba2bf641ee47828b9c6f04f676148d16d2bb65fe55843a3f02448e3
MD5 ea8ca3c26ebeb804f551ee844c322700
BLAKE2b-256 28d14d621d4ce9fbb8d7e01ac9c6da400a5c6828e99623509c8c014deb7f06d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f841fadca3c60a92a695e7ba8fab8b95e3cacf4c963143c22a6a80616068269b
MD5 6266d812126edc69eee1c38358c15d9a
BLAKE2b-256 4ceaba5de66fa663535dafb3039b119fae6c421b67378679a325a2f1ead7a1f3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taichi-1.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f73bcf773ccc922bbf17b6afd85634d38db9c990fbb94c3f1fe3b4f57238124a
MD5 0ee5f2970916d908ef7e3790a0004e70
BLAKE2b-256 5f8d06e92c83e902ea1e41f2acb9f6088e22b237e81970c22f9025bf626bd91c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 5a14151a9197c5ef8e544b6b0f7cdb76458801883ed2d386a60de6f48fd0e22f
MD5 d6d3b095071384a70d69c9b1bd37d305
BLAKE2b-256 3e805075af244b13073d46eded652c42faed15712067b354181f6684c814cf72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9816c7009725e986beebe96a6dfafd43e1c36d3044e39669603229c807e23233
MD5 fe808a5c23abc7ae2296b46607951ddb
BLAKE2b-256 87cee27674cc4e34104f6079ad53d4e3b27feef25ff59a31e33c83886d3140be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e66eaf08d209c5427d71466d02913e920800ab7209cb45f84dae49dea9893b1e
MD5 28ab556dd8b43451e5e24b514e67865e
BLAKE2b-256 9ed2cdcf3cf57aa352ffd603145fcefc7d3ef227b4e77bc62818f2528de0c5a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.2.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d9f2366ef0ddbd58c18782e89bb9b93c803fbdc326b9fc28fc8c87be67f640a2
MD5 3adcfb0cfe82a6c4ba6395db1d1e09f8
BLAKE2b-256 c99c6444b0bed7497159aca8aad01e6f33f263979f1d69fdef4da94605c679d8

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