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

Segmentation fault: 11 #43

Open
lihaoyun6 opened this issue Aug 4, 2022 · 6 comments
Open

Segmentation fault: 11 #43

lihaoyun6 opened this issue Aug 4, 2022 · 6 comments

Comments

@lihaoyun6
Copy link

run:

./dain-ncnn-vulkan -0 ~/0.png -1 ~/1.png -o ~/test.png

but get:

[0 Apple M1]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[0 Apple M1]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 Apple M1]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 Apple M1]  subgroup=32  basic=1  vote=1  ballot=1  shuffle=1
Segmentation fault: 11

platfrom:

MacBook Air M1 with 8G RAM
macOS 12.5 (21G72)

model version:

20220728

@Cygon
Copy link

Cygon commented Aug 13, 2022

I'm getting this as well. Release 20210210 works and 20220728 always segfaults.

This seems to happen independent of the command line parameters, so long as any kind of frame interpolation is attempted it fails before the first frame.

I've run dain-ncnn-vulkan in my debugger, it segfaults after this call into NCNN:

dain-segmentation-fault

It looks like ncnn::create_layer() returns nullptr because it has no layer_creator for layer no. 27 (Reshape). Both layer_registry and layer_registry_avx have other layer_creators, but are empty on index 27.

(Tested on Gentoo Linux AMD64, Intel Xeon v1 w/AVX and NVidia RTX 3090 w/Vulkan Compute and CUDA 11 working)

@Cygon
Copy link

Cygon commented Aug 13, 2022

I looked a bit further and was able to make it work.

dain-ncnn-vulkan-missing-reshape-layer

Looks like dain-ncnn-vulkan explicitly sets NCNN's WITH_LAYER-reshape to OFF. Turned it ON gets rid of the nullptr and dain-ncnn-vulkan works again!

@LeeeZH
Copy link

LeeeZH commented Aug 28, 2022

I also encountered the same problem. Can anyone tell me how to solve it?
[0 AMD Radeon RX 6750 XT] queueC=1[2] queueG=0[1] queueT=2[2]
[0 AMD Radeon RX 6750 XT] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0
[0 AMD Radeon RX 6750 XT] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1
[0 AMD Radeon RX 6750 XT] subgroup=64 basic=1 vote=1 ballot=1 shuffle=1

@fazek
Copy link

fazek commented Dec 12, 2022

Looks like dain-ncnn-vulkan explicitly sets NCNN's WITH_LAYER-reshape to OFF. Turned it ON gets rid of the nullptr and dain-ncnn-vulkan works again!

Thank you very much! That solved the problem for me, too! (Ubuntu 22.04)

@samuelhe52
Copy link

I looked a bit further and was able to make it work.

dain-ncnn-vulkan-missing-reshape-layer

Looks like dain-ncnn-vulkan explicitly sets NCNN's WITH_LAYER-reshape to OFF. Turned it ON gets rid of the nullptr and dain-ncnn-vulkan works again!

thanks very much for your solution, but i'm like a coding noob and don't know exactly how to turn that WITH_LAYER-reshape on, if you or anyone could help me out i would be eternally grateful.

@fazek
Copy link

fazek commented Jan 20, 2023

thanks very much for your solution, but i'm like a coding noob and don't know exactly how to turn that WITH_LAYER-reshape on, if you or anyone could help me out i would be eternally grateful.

Modify the src/CMakeList.txt file before compiling. It's already in there, just change the OFF to ON. But you must compile it from source. At least for Linux, this bug also crashes the prebuilt version.

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

5 participants