machine-learning-and-simulation
machine-learning-and-simulation copied to clipboard
A lid-driven implementation in Taichi
Hi @Ceyron,
I watched your amazing video on Youtube and I wrote my own implementation in Taichi language : https://gist.github.com/houkensjtu/dc00a6b8ae3d819b9295d68c55df0a29
Most of the code structures resemble your Numpy version, but I had to declare more data containers (ti.field
) in this implementation because managing memory dynamically on a GPU is rather difficult. (for that reason Taichi enforce you to allocate the fields beforehand)
The resulting script runs as well as your Numpy version and can have a pretty decent performance boost if you have a GPU.
Hope you will like it and give it a shot if you're interested (Taichi also has a autodiff system).