prstrive / UniMVSNet

[CVPR 2022] Rethinking Depth Estimation for Multi-View Stereo: A Unified Representation
MIT License
231 stars 12 forks source link

Error: no kernel image is available for execution on the device #23

Closed daekyounglee closed 1 year ago

daekyounglee commented 1 year ago

Hi, I have a question about running dtu_test.sh.

I installed Fusibile, and there were no errors during cmake . and make. Result of cmake .

-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
-- Configuring done
-- Generating done
-- Build files have been written to: /home/*****/UniMVSNet-main/fusibile-master

Result of make

[ 33%] Linking CXX executable fusibile
[100%] Built target fusibile

However when I run dtu_test.sh with DTU dataset-scan23, I got a same Error in #18 : Error: no kernel image is available for execution on the device

What could be the problem? Maybe my pytorch version?

My environments are: python 3.6 pytorch 1.8.1 CUDA 10.1

daekyounglee commented 1 year ago

Hi, I solved the error. Fusibille was the problem. I changed my environment to your recommended environment and changed the line in CMakeList.txt of fusibile. The line is related to CUDA capability.

# set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=sm_60)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=sm_75)

And I found my CUDA capability by using this code.

cd /usr/local/cuda_version/samples/1_Utilities/deviceQuery
./deviceQuery

Now it works great, I'll close the issue.

wsjshy commented 1 year ago

Thanks for your suggestion! However, I tried your method, changing my CMakeList.txt as same as yours. There is still the "no kernel image available" error, obviously we have different environments. I had noticed the way you console the CUDA capability, here is my result, and I wonder how you change the line in CMakeLists.txt according to this result. image

daekyounglee commented 1 year ago

Your cuda capability is 8.6, so you should change the line like this : set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_86,code=sm_86 -gencode arch=compute_86,code=sm_86)

I hope this answer is helpful to you in solving the error.

wsjshy commented 1 year ago

yes, I have solved this error by changing that. Thanks for your kindness!!