kysucix / fusibile

Depthmap fusion with depth and normal consistency check
GNU General Public License v3.0
192 stars 94 forks source link

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

Closed philleer closed 5 years ago

philleer commented 5 years ago

Hi, @kysucix I come across such problem when i want to do post processing of the output from mvenet there is a py script to utilize the executable binary fusibile here is the output

./fusibile/build/fusibile -input_folder ./test_scan9_90422/points_mvsnet/ -p_folder ./test_scan9_90422/points_mvsnet/cams/ -images_folder ./test_scan9_90422/points_mvsnet/images/ --depth_min=0.001 --depth_max=100000 --normal_thresh=360 --disp_thresh=0.25 --num_consistent=3.0
Command-line parameter error: unknown option -input_folder
input folder is ./test_scan9_90422/points_mvsnet/
image folder is ./test_scan9_90422/points_mvsnet/images/
p folder is ./test_scan9_90422/points_mvsnet/cams/
pmvs folder is
numImages is 49
img_filenames is 49
Device memory used: 166.592514MB
Device memory used: 166.592514MB
P folder is ./test_scan9_90422/points_mvsnet/cams/
numCameras is 49
Camera size is 49
Accepted intersection angle of central rays is 10.000000 to 30.000000 degrees
Selected views: 49
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
Reading normals and depth from disk
Size consideredIds is 49
Reading normal 0
Reading disp 0
Reading normal 1
Reading disp 1
...
Reading normal 48
Reading disp 48
Resizing globalstate to 49
Run cuda
Run gipuma
Grid size initrand is grid: 13-10 block: 32-32
Device memory used: 407.764984MB
Number of iterations is 8
Blocksize is 15x15
Disparity threshold is  0.250000
Normal threshold is     6.283185
Number of consistent points is  3
Cam scale is    1.000000
Fusing points
Processing camera 0
Found 0.00 million points
Processing camera 1
Found 0.00 million points
...
Processing camera 48
Found 0.00 million points
                ELAPSED 0.055763 seconds
Error: no kernel image is available for execution on the device
Writing ply file ./test_scan9_90422/points_mvsnet//consistencyCheck-20190423-203951//final3d_model.ply
store 3D points to ply file

i have 49 images in my images folder and i have got no result folder or files after the executation btw,i run it on my ubuntu 16.04 system with GTX1080 graphic card tensorflow-gpu 1.5.0+cuda9.0+cudnn7.0 opencv 4.0.0 gcc 5.4.0 what wrong with it, and any idea how to fix it? much thx for your help

philleer commented 5 years ago

Got it, finally! And here is my solution: i google my problem and find these issues cuda runtime error (48): no kernel image is available for execution on the device and GPU 0: no kernel image is available for execution on the device according to the reply, i find line 10 in CMakeLists.txt, here is obviously commented for different gpu architecture, so i uncomment line 11 and comment line 10.

#set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_30,code=sm_30 -gencode arch=compute_52,code=sm_52)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 --use_fast_math --ptxas-options=-v -std=c++11 --compiler-options -Wall -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61)

arch=60 and arch=61 is added just for compatibility according to nvcc fatal Then i recompile the project and now it works. BTW, i think a practical pipeline is needed for those who want to run the project quickly for experiments.

git clone https://github.com/kysucix/fusibile.git
cd fusibile
mkdir build
cd build
cmake ..
make

remember to config the CMakeLists.txt to make it works well on your machine, especially with graphical card. And after compilation you can run the executable as

./fusibile -input_folder /path/to/point_folder/ \
-p_folder /path/to/cam_folder/ \
-images_folder=/path/to/image_folder/ \
--depth_min=depth_min_value \
--depth_max=depth_max_value \
--normal_thresh=normal_thresh_value \
--disp_thresh=disp_thresh_value \
--num_consistent=num_consistent_value
XYZ-qiyh commented 4 years ago

The Compute Capability of NVIDIA GPUs can be found here. https://developer.nvidia.com/cuda-gpus#collapse4