v0.9.0 #4362
ailzhang
announced in
Announcements
v0.9.0
#4362
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Highlights
New features
1. Dynamic indexing of matrices (experimental)
In previous versions of Taichi, a matrix can be accessed only with a constant index. As a result, you cannot perform operations such as clamp the minimum element in a vector to 0:
Of course, you may use the following workaround leveraging loop unrolling. It is, however, neither intuitive nor efficient:
With this new experimental feature of dynamic indexing of matrices, you can now run the former code snippet smoothly. The feature can be enabled by setting
ti.init(dynamic_index=True)
.In v0.9.0, a new implicit FEM (Finite Element Method) example (https://github.com/taichi-dev/taichi/blob/master/python/taichi/examples/simulation/implicit_fem.py) is added, which also illustrates the benefit of having this feature. In this example, a huge (12 × 12) Hessian matrix is constructed for implicit time integration. Without dynamic indexing, the whole matrix construction loop needs to be unrolled, which takes 70 seconds to compile; with dynamic indexing, a traditional loop version can be applied, and the compilation time is shortened to 2.5 seconds.
2. Vulkan backend on macOS
Adds support for the
ti.vulkan
backend on macOS 10.15+ and now you can run GGUI on your macBook. Run the following GGUI examples to try for yourself.3. Compatibility with Google Colab
The system would crash if you run Taichi of an earlier version in the Google Colab notebook environment (see #235 for more information). In this release, we refactored our compiler implementation so that Taichi is compatible with Google Colab.
Feel free to run
!pip install taichi
to install Taichi and start your Colab journey with it.Improvements
1. More stabilized, better-organized APIs
Ensuring the developers use the right set of APIs is critical to the long-term stability of Taichi's APIs. In this release, we started to reorganize its package structure and deprecate some obsolete or internal APIs. The following table lists some critical APIs that may concern you.
max()
ti.max()
min()
ti.min()
obj.atomic_add()
ti.atomic_add()
ti.imread()
ti.tools.imread()
ti.imwrite()
ti.tools.imwrite()
ti.imshow()
ti.tools.imshow()
ti.print_profile_info()
ti.profiler.print_scoped_profiler_info()
ti.print_kernel_profile_info()
ti.profiler.print_kernel_profiler_info()
2. Better error reporting
Lengthy traceback in an error report, for most of the time, can be distracting, making it hard to locate the code causing the error. In this release, we've removed the trivial traceback that does not concern developers in our error reporting to improve the debugging experience.
Taking the following code snippet as an example:
Before v0.9.0, the error message looks like this:
In v0.9.0, the error message looks like this:
3. Revamped Taichi's documentation site
To improve the readability and user-friendliness of our documentation, we restructured Taichi's documentation site and incorporated API reference into it.
Join our discussions to build the next Taichi release for you!
We believe that our community plays a pivotal role in the development of the Taichi programming language. In that spirit, we encourage you to take an active part in our GitHub Discussions, propose potential changes, and contribute your ideas. Together, we improve the Taichi language release by release, for you and for every developer.
The following is a selected list of hot topics for you to start with:
Specifically, because beginners to Taichi sometimes get lost in different APIs such as
ti.Vector
,ti.types.vector
,ti.Vector.field
, we plan to make them clearer and would like to have your opinions on these proposed practices:ti.types.vector
to define a vector type.my_vec2i = ti.types.vector(2, ti.i32)
, usemy_vec2i([5, 10])
for a vector object.ti.vector([1, 2])
as a shortcut forti.types.vector()([1, 2])
, which automatically infers missing type information of the object.ti.field(dtype=my_vec2i, shape=100)
for a field object.API changes
See this Google doc for a representative list of APIs deprecated in this release.
Full changelog:
VectorType
and legacy loop vectorization #4096) ([opt] Remove legacy vectorization pass (#4096) #4099) (by daylily)This discussion was created from the release v0.9.0.
Beta Was this translation helpful? Give feedback.
All reactions