-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ncnn::destroy_gpu_instance() causes Segmentation fault on Jetson Nano #978
Comments
I just add the environment info:
|
the global instance cleanup should be called after all the other instance destructions you have to create an inner scope for the Net instance, so that the Net instance destructor is called before ncnn::destroy_gpu_instance();
|
@nihui Again, thank you for creating the great library!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I built ncnn library with Vulkan support for Jetson Nano and created a simple project to test it.
Inference worked. (The result was a little different from CPU, but still correct and working)
However, when I call ncnn::destroy_gpu_instance() at the end of code, Segmentation fault (core dumped) occurs.
Does anyone have the same problem or is it only me?
When I set
net.use_vulkan_compute = 0
, error doesn't happen. So, I think it definitely caused by GPU.This is my code: https://github.com/take-iwiw/NcnnMultiPlatformProject/blob/master/MyNcnnProject/TestVulkan.cpp
The following might be another topic, but might be related.
To create ncnn library, I basically followed the instruction described here https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-nvidia-jetson
When I built ncnn, I got
Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
error. Also, I got link error (e.g.pipeline.cpp:(.text+0xf28): undefined reference to vkCreatePipelineLayout'
).So, as an ugry workaround, I modified CMakeLists.txt like the following. (
/mnt/usbm/Vulkanloader_demos_1.1.10
is the directory I extracted Vulkan_loader_demos_1.1.100.tar.gz. )I don't think this is the reason of the problem, though.
If anyone know smarter way to build ncnn librarh for Jetson Nano, please tell me.
I think Vulkan is pre-installed with JetPack, but for some reasons,
find_package(Vulkan REQUIRED)
doesn't work...Thank you
The text was updated successfully, but these errors were encountered: