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

Uploaded CPython 3.10Windows x86-64

taichi-1.1.0-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.0-cp310-cp310-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.10

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.15+ x86-64

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

Uploaded CPython 3.10macOS 10.14+ x86-64

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

Uploaded CPython 3.9Windows x86-64

taichi-1.1.0-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.0-cp39-cp39-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.9

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.15+ x86-64

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

Uploaded CPython 3.9macOS 10.14+ x86-64

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

Uploaded CPython 3.8Windows x86-64

taichi-1.1.0-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.0-cp38-cp38-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.8

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

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.15+ x86-64

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

Uploaded CPython 3.8macOS 10.14+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

taichi-1.1.0-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.0-cp37-cp37m-manylinux2014_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.7m

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

Uploaded CPython 3.7mmacOS 10.15+ x86-64

taichi-1.1.0-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.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: taichi-1.1.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 61d888393ee7a9012042ab817a1243706452e12ea44baf1c2a0660c811f5bda2
MD5 911b130523132c3c33e3767f05f1e10a
BLAKE2b-256 d9c6eb6ab0d835c7808bfbda33f629800dbb3958efa02bec2e1212df058b54ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 9ebaf54862728fe69a104ecf953d01244ed46508076e040716d73c6297e4cd6d
MD5 dd97e3866c745d96691e6db0117630b2
BLAKE2b-256 64efaf4cd889bdacd3b175a893bb59ed81b605abedb6914c4d5d115df06fe65f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9285d555b52499d5ef3845842b59c40b355a712df1f14b55e45afbeaacdf8e7d
MD5 2c18dbf8de1f4105a14a64f7c11fcdc8
BLAKE2b-256 b37743607797701379912dcd39ccf5e993ee9e734e9f5cba41e91248da224940

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9ff7ba4e25a00cdf234030557cfae98aa5c8911a11db418a8193afc3ecd31b6
MD5 e8edc5df0fe934726179d2b2cc9ca077
BLAKE2b-256 19df1baa5f6e9aa8094b5cd61c0bf5b269ebbaad364a0111d7e462f526122a57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ebc2fe7a3f62623c723de29225729ec8a7c43d64e0a0489fbe699bd4a58be590
MD5 c8a6d2ca1cb1418bcb71087848cd7e37
BLAKE2b-256 9c350f31b56520598fd6f76ee380118499ee5f4a6ea5595916bcb1c030195afb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6b490f191790a22a0dcdc73268867d09f62ac9019a4342d5084f6245d2f5f5fe
MD5 ec1aa76eeac5255eeb2dc08a1fccb68c
BLAKE2b-256 dfa330bd5a166b97fbc7d7f374815c32330aa1de21a1daca4d238b25aa8cd60c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.1.0-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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cab4fb850b17cf8ce971caab664ac40a25c0cb67960ac7834ec6246ace0c9247
MD5 d182515b0db7a427470f815a81155c08
BLAKE2b-256 24ba1059ce5cd10939e54f63b5ce7a6d1c9c0c4c34090ea7bf58ab4da74449a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 8f709589f3189845fd433bc7336863e68c47eabafdc844e27cf5654d0b88116a
MD5 15d316cd12af6652275390323cc4f7e4
BLAKE2b-256 7d649f76bed94c5d60b920812a676139bca74e09a7ab3b8914d58be1e9963a6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2566aac0982b03a4c3a09eaad93a47df805eb817076a4e956ef66dd0f1e2216
MD5 509aad26ef59cb4d52e8e8bfc1a85759
BLAKE2b-256 7892a08d5edd1d2b5962c84f00cdd7e7dc161d93ecf911cc201efd1ae6fae05a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3feaf748627a7869f236d0bee7e765a1b3faccd3e8b58dbd3eb9b31386eb41c
MD5 92458cdfd8b58048414ed6509b7ae217
BLAKE2b-256 211dc292836c203cccec4a0c3b6f4c6d22842455dcffdb1f08d0ca5312c437d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3137ced827007c83e4c3fd021539faea75d093f9d2b441a8edb2724717bbe3e8
MD5 6562d84ab24356b8c499f71d9f0b6e99
BLAKE2b-256 599c4b9c2a55ef724538e941b9e7b2e6d95f65ee912e26f7fe96cfa8ce65077c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 04ea87844e5fcb782e7349a36b8ad25112709fe9e3fab68436e33d159a8f0d13
MD5 af61e197186b6191814e58d45d7dd2a3
BLAKE2b-256 0e992d45b188c63dbfead6a73ec1a21a653d63ac3938434c189d4d154bc334db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.1.0-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.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 231f763890704658d421ac3bd4976f07606d0486ef5a88239f2600fc39b1155b
MD5 688de73c235d7c7aa1c1859156eeb317
BLAKE2b-256 f79b4a603d0a48899f9029480f2b4bb446c40da6024de0cbc52fb1e4c33e8d30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 00a8ec37ed6d306fc775a13405929f4dcf981b5798c174ec0611621c7cc6885c
MD5 93c62bc1931b1b9564a7f0be9133eafd
BLAKE2b-256 938dd8c5ccf15a464c1cef22695cd6642ca29e6e88a94a1a5f013419e222f243

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d2569b262b3bc6f3c54f7daff83dcd953a49d8d20a430283b7b83a849020a0d
MD5 c1d5e71713f0935788c74674d23450c8
BLAKE2b-256 994f5c627da5b6b4c68fa0f3abe3525b736da65dfa2b1d1a49d62ed530259308

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e6b5616af97d8ed2f89cca0f9d4d9124a9028b8785ddd52fbcd08928d5edcf7
MD5 1f5e9d031d83546742dc89db97528098
BLAKE2b-256 5a0cead34f537d47f5e67a0ac8fa7221b6cf2a5fc64c1265c35574904df24ad9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2878c395f703825d6b871729813c267cb25bdfd16b1723a89122e2d74b529984
MD5 df043f6efff16773f2921396a5371a4a
BLAKE2b-256 9f5d445edf2a96e939ae0a1453171f7125d3a00f52f0035a81a3c7399d18114b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fd25fffbf13e7c05bc007a06b76bf59eefc4a23ee74ac37d4ce80abc048850f5
MD5 3b6f16aec3d00e4c7befd680c751de64
BLAKE2b-256 fd1c2ded44a7a75258f2c495f89f675aac30e0b4ece54ce564f6e197d22b7f34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taichi-1.1.0-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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 38ae9ea50ecb05631c6b82bae41afdaf86b47447e4ca9d5164f09b3cb6c25e6c
MD5 a7095c3f5acf45be269c21f58c33ba23
BLAKE2b-256 cbf87048da9df9f75b2ab07b497f91cd574f3e40ac4934716a5256f9770e67c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6a97db1f4d0f811801b2eff6f92ef9f0b268d7b18b5afff961014c515fa392db
MD5 c0fb49a8a43421578914324553bc571a
BLAKE2b-256 61e11eb272d29f21ef081d227a4e646141c22a9aea247bb8972c8578ca03801c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 718b932b0bcb302e62c99a734eb995f06244b1b974a92f5009347c4bcf16d61b
MD5 eb2026a56fbd5a3e68fb6b650b749308
BLAKE2b-256 82ff6de1f1cdc012500477771d2fdf3a0b2eb631d4a840e7d63e9823be1b60f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 aabef5b4f9917269e6368257aba91f3db50fc5834673a44d3c08320db4507b75
MD5 2fe8627c5db923c518282eb48c33c87c
BLAKE2b-256 9f08f8eb451ed6e54bc9aefd7e9c9f3fbc2425194f1da25b5d511f4b6500075c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taichi-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b340310269696bbf8c2e8d7a63dae039a671e862c0e269fb4b533a7ace4e4666
MD5 439fad2386137daa7807d4a8e25352ef
BLAKE2b-256 1c34f1a6db49918addd1e8c8ee2d47d13c8e055eaecd00e7118b1f63ea9c1fb3

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