Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to record the order of kernel and automatically launch them? #34

Open
Hanke98 opened this issue Sep 10, 2022 · 2 comments
Open

How to record the order of kernel and automatically launch them? #34

Hanke98 opened this issue Sep 10, 2022 · 2 comments

Comments

@Hanke98
Copy link

Hanke98 commented Sep 10, 2022

Hi, everyone!

We are currently working on implementing our simulator using Taichi AOT. We can dump the shaders according to the demo code of implicit_fem.py. However, it seems that we cannot record the calling order of each kernel and we have to manually launch the kernels, which is not very productive. Is it possible to dump the launch order of the kernels and automatically launch them?

Thanks in advance!

@bobcao3
Copy link
Collaborator

bobcao3 commented Sep 13, 2022

You can check out the compute graph work we have been doing. We decided to go with a graph API instead of a tracing API, as capturing a series of kernels is very hard to implement correctly. @ailzhang knows more about this

@ailzhang
Copy link
Contributor

@Hanke98 You can checkout a cgraph version of implicit fem here https://github.com/taichi-dev/Taichi-UnityExample/blob/main/scripts/implicit_fem.cgraph.py. With this you'll be able to encode the calling order of kernels and simplify the calling code inside deployment environment. https://github.com/taichi-dev/Taichi-UnityExample/blob/main/Assets/Scripts/ImplicitFem.cs#L218-L244 Please note this feature is WIP so API/implementation details might change, but we'll keep the demos in UnityExample repo up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants