-
Notifications
You must be signed in to change notification settings - Fork 131
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
can not import torch when I use rknntoolkit #1195
Comments
How exactly did you add the librknnrt.so and libc++_shared.so libraries to your app? If you did it manually, please explain where you got them from and where you copied them to. Or if you used a Gradle dependency, please give its name. Please also post the error message as text, rather than an image. That way other people with similar problems are more likely to find it in searches, and one of them may be able to help you. |
@mhsmith I add librknnrt.so manually. But libc++_shared.so automatically.
As for the Libc++_shared.so, I only mentioned it in build.gradle(:app).
|
And where exactly did you get librknnrt.so from? Please give complete instructions, including links and version numbers. |
@mhsmith https://github.com/airockchip/rknn-toolkit2/blob/master/rknpu2/runtime/Android/librknn_api/arm64-v8a/librknnrt.so I got librknnrt.so from here. About instructions,I simply link so file in CMakeLists.txt I mentioned before. |
@mhsmith I need to infer my model on rockship RKNN3588 and develop our deployment SDK using Android. And we have python scripts developed before and we want them to deal with the results from the model deploment. So we need chaquopy to import these scripts. |
Thanks for the information. I'm not very familiar with torch, and I'm not familiar with RKNN at all, so I can't be certain about what the problem is. The only thing that stands out to me is that in the stack trace at the top of this page, libtorch_cpu, which was originally linked against Chaquopy's copy of libc++_shared, is instead calling into the libc++_shared which was added to the app by your own CMake build. Chaquopy's copy came from NDK version 22.1.7171670, so try setting your app's |
I use rknntoolkit to deploy my models.But I found its sdk conflict with torch.I try both torch==1.4.0 1.8.1.They dont work. How can I solve the problem? When I strip out the rknntolkit part ,it works.
Chaquopy version
12.0.1
build.gradle file
The text was updated successfully, but these errors were encountered: