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

模型加载后,退出程序总会报错 #3058

Closed
Tomhouxin opened this issue Jul 8, 2021 · 16 comments
Closed

模型加载后,退出程序总会报错 #3058

Tomhouxin opened this issue Jul 8, 2021 · 16 comments

Comments

@Tomhouxin
Copy link

Tomhouxin commented Jul 8, 2021

error log | 日志或报错信息 | ログ

52

context | 编译/运行环境 | バックグラウンド

Windows vs2019
vulkan1.2
ncnn最新的vs2019版本
RTX3060,驱动版本为461.72
原demo:nanodet

how to reproduce | 复现步骤 | 再現方法

1.使用vs2019打开nanodet,运行
2.关闭软件的时候报内存错误

more | 其他 | その他

1.已验证使用cpu是没毛病的,所以猜测可能是vulkan的问题嘛
2.发现vulkan最新版本支持显卡驱动版本为458.36,但此版本与我的显卡不兼容
3.应该有人会说为啥不用TRT。。。。

@deepage
Copy link
Contributor

deepage commented Jul 8, 2021

1.你可以尝试运行benchncnn看看vulkan是否正常。
2.或者你可以尝试下ncnn/examples/nanodet

@liushuan
Copy link

liushuan commented Oct 15, 2021

我也遇到了相同的错误@Tomhouxin 你的解决了吗?

我的环境:
windows10
Nvidia 2080Ti 驱动版本:496.13
VulkanSDK 1.2.189.2
ncnn 版本时间 2021/07/20

我这边运行benchmark 会报下面的错误:
compile_spirv_module failed -1
create_shader_module failed
compile spir-v module failed
ERROR: 0:10: 'constant_id' : only allowed when generating SPIR-V
ERROR: 0:10: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

compile_spirv_module failed -1
create_shader_module failed
compile spir-v module failed
ERROR: 0:10: 'constant_id' : only allowed when generating SPIR-V
ERROR: 0:10: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

@Tomhouxin
Copy link
Author

@liushuan 没有解决,bug依旧存在,ncnn还是对嵌入式更为友好一点

@HwanWoongLee
Copy link

@liushuan did you solved this problem?

@Yoh-Z
Copy link
Contributor

Yoh-Z commented Nov 11, 2021

nihui: main 函数退出前,调用下 ncnn::destroy_gpu_instance() 试试

@Tomhouxin
Copy link
Author

@Yoh-Z 曾经试过你这种,但是依旧存在

@Yoh-Z
Copy link
Contributor

Yoh-Z commented Dec 16, 2021

@Tomhouxin 我的报错信息和你完全一样,在main的return 0;之前调用ncnn::destroy_gpu_instance()解决了问题。

@Tomhouxin
Copy link
Author

@Yoh-Z 因为我是封装的dll,所以我是在析构函数里加的这句话,应该性质是一样的吧

@Yoh-Z
Copy link
Contributor

Yoh-Z commented Dec 16, 2021

@Tomhouxin 如果后面没有再调用ncnn的代码就没问题。我也封装了dll,这样也能解决问题。

@Tomhouxin
Copy link
Author

@Yoh-Z 除此之外,我还有个问题,我在30系列的显卡上好像调用不到GPU

@Yoh-Z
Copy link
Contributor

Yoh-Z commented Dec 26, 2021

@Tomhouxin emmm,我这里一直是用的20系的显卡,不知道30系的情况。不过按理来说30系显卡运行vulkan也没问题。可以加进ncnn卷卷群艾特nihui试试~

@lsy0816
Copy link

lsy0816 commented Jun 7, 2022

@Tomhouxin 我也有这个问题,在3060显卡上调用不到GPU,请问你已经解决这个问题了吗

@Tomhouxin
Copy link
Author

Tomhouxin commented Oct 11, 2022 via email

@nihui
Copy link
Member

nihui commented Dec 19, 2023

#5234

@nihui
Copy link
Member

nihui commented Dec 20, 2023

fixed in ded0b78

@nihui nihui closed this as completed Dec 20, 2023
@www591rmb
Copy link

我也遇到这样的问题,已经解决.
在销毁前 调用 ncnn::destroy_gpu_instance()

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

8 participants