Closed Ca0L closed 9 months ago
also got the same error, how did you solve the problem
also got the same error, how did you solve the problem
Sorry, I haven't solve it yet.
I got a segfault, I think/thought it's malformed vertices.
UNASSIGNED-khronos-validation-createinstance-status-message(INFO / SPEC): msgNum: -671457468 - Validation Information: [ UNASSIGNED-khronos-validation-createins
tance-status-message ] Object 0: handle = 0x15cce443550, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd7fa5f44 | Khronos Validation Layer Active:
Settings File: Found at C:\Users\wylie\AppData\Local\LunarG\vkconfig\override\vk_layer_settings.txt specified by VkConfig application override.
Current Enables: None.
Current Disables: VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT.
Objects: 1
[0] 0x15cce443550, type: 1, name: NULL
INFO:
GENERAL [Loader Message (0)] : Inserted device layer VK_LAYER_KHRONOS_validation (C:\VulkanSDK\1.2.182.0\Bin\\.\VkLayer_khronos_validation.dll)
INFO:
GENERAL [Loader Message (0)] : Inserted device layer VK_LAYER_OBS_HOOK (C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll)
INFO:
GENERAL [Loader Message (0)] : Inserted device layer VK_LAYER_NV_optimus (C:\WINDOWS\System32\DriverStore\FileRepository\nvltwi.inf_amd64_62c6fe9661e469e3\.\nvo
glv64.dll)
error: process didn't exit successfully: `target\debug\peregrine.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Segmentation fault
If this topic is still open, here is how to fix it
#include "net.h"
#include <iostream>
#include <string>
int main(int argc, char* argv[])
{
ncnn::Net model;
model.opt.use_vulkan_compute = true;
model.set_vulkan_device(1);
ncnn::destroy_gpu_instance(); // <--- Add this
std::cout << "OK" << std::endl;
return 0;
}
While this hasn't been fixed, I believe that you should explicitly call destroy_gpu_instance()
if the code calls create_gpu_instance()
at some point (which is done with set_vulkan_device
in your case)
Theoretically, it's already done inside of ~__ncnn_vulkan_instance_holder()
(see gpu.h
and gpu.cpp
) while deleting the static __ncnn_vulkan_instance_holder g_instance;
I've done that being on the tag 20210720
@JujuDel hello, after searching for the issue, I found that this solution is to solve this problem , and has no effect on the current problem, do you have any other solution? thx.
Bug
This code raised a segmentation fault.
This is the makefile I used,
test-softmax.cpp
contains the code above.This is the output.
This is the backtrace:
Environment