Graphics programming language Taichi (Tai Chi) released version 1.0.0

Taichi, a programming language designed for high-performance computer graphics, has released version 1.0.0, which is a milestone version and brings a lot of new features. Another thing to note is that the license has been changed from MIT to Apache 2.0 .

License change

Taichi's license was changed from MIT to Apache-2.0 after a public vote. #4607

Python 3.10 support

This release supports Python 3.10 on all supported operating systems (Windows, macOS, and Linux).

Manylinux2014

Before v1.0.0, Taichi was only available for Linux distributions that supported glibc 2.27+ (eg Ubuntu 18.04+). As of v1.0.0, in addition to the normal Taichi wheels, Taichi also provides manylinux2014 compatible wheels that run on most modern Linux distributions, including CentOS 7.

new function

Non-Python Deployment Solutions

In collaboration with OPPO US Research Center, Taichi provides Taichi AOT, a solution for deploying kernels in non-Python environments such as mobile devices.

The compiled Taichi kernel can be saved from the Python process, then loaded and run by the provided C++ runtime library . Through a set of APIs, Python/Taichi code can be easily deployed in any C++ environment. Click here to viewtaichi-aot-demothe repo.

Note that currently Taichi only supports the Vulkan backend in the C++ runtime library.

real  function (experimental)

All Taichi functions are inlined into the Taichi kernel during compilation. However, if there are too many Taichi function calls, the kernel becomes verbose and takes longer to compile. This is especially true if the Taichi function involves compile-time recursion .

This release introduces a "real function", a new type of Taichi function that can be compiled independently rather than being inlined into the kernel. This is an experimental feature and currently only supports scalar arguments and scalar return values.

Type annotations for literals

As of v1.0.0, it is possible to write type annotations for literals:

@ti.kernel
def foo():
    a = ti.u32(2891336453)  # similar to 2891336453u in C

mathmodule

This release adds a mathmodule to support GLSL standard vector operations and makes it easier to port GLSL shader code to Taichi.

CLI commands ti gallery 

This release introduces the CLI command ti gallery, which allows selecting and running Taichi examples in a pop-up window. for example:

ti gallery

A window pops up:

Click on any example in the runnable popup and the console prints the corresponding source code at the same time.

Improve

Enhanced matrix type

As of v1.0.0, Taichi accepts matrix or vector types as arguments and return values, either using ti.types.matrixor ti.types.vectoras a type annotation.

Taichi also supports basic read-only matrix slicing, using mat[:,:]syntax to quickly retrieve specific parts of a matrix.

assertf-string support in statements

This release supports assertincluding f-strings as error messages in statements, and it is possible to include scalar variables in f-strings.

 

More details can be found in the release announcement .

Guess you like

Origin www.oschina.net/news/191119/taichi-1-0-0-released