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

Bug report: Ignored launch because kernel handle is null #11

Open
Hanke98 opened this issue Nov 2, 2022 · 4 comments
Open

Bug report: Ignored launch because kernel handle is null #11

Hanke98 opened this issue Nov 2, 2022 · 4 comments

Comments

@Hanke98
Copy link

Hanke98 commented Nov 2, 2022

Hi, I am working on benchmarking some algorithms with Taichi-AOT on mobile phones. I built the libtaichi_c_api.so and libtaichi_unity.so for android according to the instructions. However, when I launch the launch the unity project on my phone, the scene with armadillo shows but fails to run simulation steps. Here 's the errors I got from logcat:

E  InvalidOperationException: Ignored launch because kernel handle is null at Taichi.ComputeGraph.LaunchAsync 
(Taichi.Generated.TiNamedArgument[] namedArgs) [0x00020] in  /......./Taichi-UnityExample/Assets/Taichi/ComputeGraph.cs:20  at Taichi.ComputeGraph.LaunchAsync 
(System.Collections.Generic.Dictionary`2[TKey,TValue] namedArgs) [0x0014e] in /......./Taichi-UnityExample/Assets/Taichi/ComputeGraph.cs:53   at ImplicitFem.Update () [0x0028b] in  /......./Taichi-UnityExample/Assets/Scripts/ImplicitFem.cs:218 

It seems that it failed to launch the kernel.

In fact, one month ago(Oct. 1), I managed to launch the demo, with taichi-unity2@196fa01 and Taichi with my minor hacking (you can find it in my fork). But it has some problem with memory (That's why I did some hack). It seems that the recent version of taichi-unity2 fixes the problem of memory but causes the errors above.

I really need this demo to work normally since it is part of my project, so any advices will be very appreciated ! Thanks in advance.

@tianlajiangjun
Copy link

I have the same problem!
I ran cgraph.py and got graph.tcm. But putting it in Unity environment doesn't work correctly

@Hanke98
Copy link
Author

Hanke98 commented Mar 24, 2023

I have the same problem!
I ran cgraph.py and got graph.tcm. But putting it in Unity environment doesn't work correctly

Hi @tianlajiangjun! After consulting @PENGUINLIONG, I found that rerun the python scripts to generate modules and rebuild taichi_c_api.dll and taichi_unity.dll can solve the problem. Maybe you can have a try:-)

@tianlajiangjun
Copy link

Thank you for your reply!
It means that I need to build taichi from source to get taichi_c_api.dll?

@Hanke98
Copy link
Author

Hanke98 commented Mar 27, 2023

Thank you for your reply!
It means that I need to build taichi from source to get taichi_c_api.dll?

Yeah, rebuilding the dlls works for me.

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

2 participants