xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
28.28k stars 3.55k forks source link

vkQueueSubmit failed -4 #106

Open mkrishtopa opened 3 years ago

mkrishtopa commented 3 years ago

realesrgan-ncnn-vulkan-20210901-windows.zip Win10 Home, GF 920M

Run with realesrgan-ncnn-vulkan.exe -i 01.JPG -o 01-up.jpg

Tried with different files, same error(s). Got black plain jpg file on output.

allrobot commented 3 years ago

Me, too. Wait for someone to tell us what to do.

Microsoft Windows [版本 10.0.17763.316] (c) 2018 Microsoft Corporation。保留所有权利。

C:\Windows\system32>cd C:\Users\li1gu\Desktop\Project\YOLOV5\realesrgan-ncnn-vulkan-20210901-windows

C:\Users\li1gu\Desktop\Project\YOLOV5\realesrgan-ncnn-vulkan-20210901-windows>realesrgan-ncnn-vulkan.exe -i 1.png -o 11.png [0 NVIDIA GeForce GTX 1060] queueC=2[8] queueG=0[16] queueT=1[2] [0 NVIDIA GeForce GTX 1060] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [0 NVIDIA GeForce GTX 1060] fp16-p/s/a=1/1/0 int8-p/s/a=1/1/1 [0 NVIDIA GeForce GTX 1060] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 [1 Intel(R) HD Graphics 630] queueC=0[1] queueG=0[1] queueT=0[1] [1 Intel(R) HD Graphics 630] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [1 Intel(R) HD Graphics 630] fp16-p/s/a=1/1/0 int8-p/s/a=1/0/0 [1 Intel(R) HD Graphics 630] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 0.00% vkWaitForFences failed -4 50.00% vkQueueSubmit failed -4

78Alpha commented 3 years ago

It looks like you have 2 GPUs, try doing

set CUDA_VISIBLE_DEVICES=1 & realesrgan-ncnn-vulkan.exe ...

or whatever number from 0 to the max number until you get the dedicated GPU. I ran into this problem 1 minute ago and noticed it was trying to add frames to my RTX 2060 instead of RTX 3070 and threw the error due to the 2060 being busy with StyleGan.

isudfv commented 3 years ago

I do have two GPUs, but there's only one listed.

PS C:\Users\yieatn\Downloads\Compressed\realesrgan-ncnn-vulkan-20210801-windows> .\realesrgan-ncnn-vulkan.exe -i C:/Users/yieatn/Pictures/wallhaven-wqmegx.jpg -o test5.png [0 NVIDIA GeForce GTX 1060] queueC=2[8] queueG=0[16] queueT=1[2] [0 NVIDIA GeForce GTX 1060] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [0 NVIDIA GeForce GTX 1060] fp16-p/s/a=1/1/0 int8-p/s/a=1/1/1 [0 NVIDIA GeForce GTX 1060] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 0.00% 0.12% ... 7.34% 7.46% vkWaitForFences failed -4 7.58% vkQueueSubmit failed -4 7.69% vkQueueSubmit failed -4 ... 12.24% vkQueueSubmit failed -4

luk13-eto commented 3 years ago

Have same issue on laptop with gtx760m

78Alpha commented 3 years ago

I do have two GPUs, but there's only one listed.

PS C:\Users\yieatn\Downloads\Compressed\realesrgan-ncnn-vulkan-20210801-windows> .\realesrgan-ncnn-vulkan.exe -i C:/Users/yieatn/Pictures/wallhaven-wqmegx.jpg -o test5.png [0 NVIDIA GeForce GTX 1060] queueC=2[8] queueG=0[16] queueT=1[2] [0 NVIDIA GeForce GTX 1060] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [0 NVIDIA GeForce GTX 1060] fp16-p/s/a=1/1/0 int8-p/s/a=1/1/1 [0 NVIDIA GeForce GTX 1060] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 0.00% 0.12% ... 7.34% 7.46% vkWaitForFences failed -4 7.58% vkQueueSubmit failed -4 7.69% vkQueueSubmit failed -4 ... 12.24% vkQueueSubmit failed -4

If you launch something like GPU-Z does it have Vulkan checked?

Animus120 commented 3 years ago

I'm having the same issue too, right now it's showing both of my integrated GPU and dedicated GPU on my laptop. It threw me error like this:

[0 NVIDIA GeForce GTX 1050] queueC=2[8] queueG=0[16] queueT=1[2] [0 NVIDIA GeForce GTX 1050] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [0 NVIDIA GeForce GTX 1050] fp16-p/s/a=1/1/0 int8-p/s/a=1/1/1 [0 NVIDIA GeForce GTX 1050] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 [1 Intel(R) UHD Graphics 630] queueC=0[1] queueG=0[1] queueT=0[1] [1 Intel(R) UHD Graphics 630] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [1 Intel(R) UHD Graphics 630] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1 [1 Intel(R) UHD Graphics 630] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 vkWaitForFences failed -4 0.00% vkQueueSubmit failed -4 11.11% vkQueueSubmit failed -4 22.22% vkQueueSubmit failed -4 vkQueueSubmit failed -4 vkQueueSubmit failed -4 33.33% vkQueueSubmit failed -4 44.44% vkQueueSubmit failed -4 55.56% vkQueueSubmit failed -4 vkQueueSubmit failed -4 vkQueueSubmit failed -4 66.67% vkQueueSubmit failed -4 77.78% vkQueueSubmit failed -4 88.89% vkQueueSubmit failed -4

justUmen commented 3 years ago

Same here, on linux laptop. :( With only 1 integrated intel gpu/

My GPU run at 99.99% for a few seconds and after crash with something like :

vkQueueSubmit failed -4
vkQueueSubmit failed -4
vkQueueSubmit failed -4
66.67%
vkQueueSubmit failed -4
77.78%
vkQueueSubmit failed -4
88.89%
vkQueueSubmit failed -4
justUmen commented 3 years ago

Apparently, this problem happens because by default some video drivers check for abnormal behavior, like this 99.99% gpu usage for more than 4 seconds.

For linux/intel users like me, one solution is to tell the i915 driver (in my case) that everything is fine by disabling temporarily the hang checking system : sudo sh -c "echo N> /sys/module/i915/parameters/enable_hangcheck"

HolyWu commented 3 years ago

You probably have to increase TDR value on Windows. See https://substance3d.adobe.com/documentation/spdoc/gpu-drivers-crash-with-long-computations-128745489.html.

isudfv commented 2 years ago

Apparently, this problem happens because by default some video drivers check for abnormal behavior, like this 99.99% gpu usage for more than 4 seconds.

For linux/intel users like me, one solution is to tell the i915 driver (in my case) that everything is fine by disabling temporarily the hang checking system : sudo sh -c "echo N> /sys/module/i915/parameters/enable_hangcheck"

any method for windows?

HolyWu commented 2 years ago

I already gave the answer in the link above for Windows users. Change both TdrDelay and TdrDdiDelay to 60 (in Decimal) under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. If the keys do not exist, right-click in the right pane and choose New > DWORD (32bit) Value. Then restart your computer.

luk13-eto commented 2 years ago

Just tried solution with registry. It is really works on Win10 laptop with old gtx760m. Thank you.

I already gave the answer in the link above for Windows users. Change both TdrDelay and TdrDdiDelay to 60 (in Decimal) under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. If the keys do not exist, right-click in the right pane and choose New > DWORD (32bit) Value. Then restart your computer.

abdo2048 commented 2 years ago

I already gave the answer in the link above for Windows users. Change both TdrDelay and TdrDdiDelay to 60 (in Decimal) under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. If the keys do not exist, right-click in the right pane and choose New > DWORD (32bit) Value. Then restart your computer.

After I did so, it won't run now "This app can't run on your PC" and then it shows to me in CMD "Access is denied" This app can't run on your PC

N3K00OO commented 2 years ago

I already gave the answer in the link above for Windows users. Change both TdrDelay and TdrDdiDelay to 60 (in Decimal) under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. If the keys do not exist, right-click in the right pane and choose New > DWORD (32bit) Value. Then restart your computer.

After I did so, it won't run now "This app can't run on your PC" and then it shows to me in CMD "Access is denied" This app can't run on your PC

yeah that happened to me 3x during this moth for me i juts simply delete and reinstalling it and it work every time not sure why it keeps doing it i have tried to recreate this error many times but to no avail

edit sorry for bad English