stannum icon indicating copy to clipboard operation
stannum copied to clipboard

Memory and Performance issue of Taichi

Open ifsheldon opened this issue 3 years ago • 4 comments

With the current Taichi (v0.9.1 - 1.2.1), calling Tube N times will result in N^2 time complexity because when creating a field Taichi need to inject kernel information into a field which leads to memory movement which is O(M) where M is the number of existing fields. The complexity is simply 1+2+3+....+N = O(N^2). This is not our fault. And Taichi developers are fixing it, although it takes quite some time.

In the forward-only computation, this can be resolved by eagerly destroying fields and SNodeTree, which is included in stannum=0.6.2.

ifsheldon avatar Mar 21 '22 12:03 ifsheldon

related Taichi issue.

ifsheldon avatar Jun 30 '22 12:06 ifsheldon

The Taichi issue is closed. Looking forward to Taichi new release!

ifsheldon avatar Sep 14 '22 07:09 ifsheldon

The new release of Taichi 1.1.3 includes the PR for performance improvement, so this issue is resolved.

ifsheldon avatar Sep 20 '22 14:09 ifsheldon

Reopen this because Taichi still has the problem on other backends (Vulkan and Metal) while the problem was fixed on CPU and CUDA backends.

See this issue.

ifsheldon avatar Sep 23 '22 15:09 ifsheldon