Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.54k stars 4.18k forks source link

Warning when make cnn #1709

Open llf0818 opened 4 years ago

llf0818 commented 4 years ago

when i make ncnn, it views as following And i try to run a ncnn demo, there is no out value with shape [0,0,0]

Scanning dependencies of target mxnet2ncnn
Scanning dependencies of target generate-spirv
[  0%] Running C++ protocol buffer compiler on onnx.proto
[  1%] Running C++ protocol buffer compiler on caffe.proto
[  2%] Building CXX object tools/mxnet/CMakeFiles/mxnet2ncnn.dir/mxnet2ncnn.cpp.o
[  2%] Built target generate-spirv
Scanning dependencies of target ncnn
Scanning dependencies of target onnx2ncnn
[  3%] Building CXX object tools/onnx/CMakeFiles/onnx2ncnn.dir/onnx2ncnn.cpp.o
Scanning dependencies of target caffe2ncnn
[  3%] Building CXX object tools/caffe/CMakeFiles/caffe2ncnn.dir/caffe2ncnn.cpp.o
[  4%] Building CXX object src/CMakeFiles/ncnn.dir/allocator.cpp.o
[  4%] Building CXX object src/CMakeFiles/ncnn.dir/blob.cpp.o
[  4%] Building CXX object src/CMakeFiles/ncnn.dir/command.cpp.o
[  5%] Building CXX object src/CMakeFiles/ncnn.dir/cpu.cpp.o
[  5%] Building CXX object src/CMakeFiles/ncnn.dir/datareader.cpp.o
[  6%] Building CXX object src/CMakeFiles/ncnn.dir/gpu.cpp.o
[  6%] Building CXX object src/CMakeFiles/ncnn.dir/layer.cpp.o
[  7%] Building CXX object src/CMakeFiles/ncnn.dir/mat.cpp.o
[  7%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel.cpp.o
[  7%] Linking CXX executable mxnet2ncnn
[  7%] Built target mxnet2ncnn
[  8%] Building CXX object tools/caffe/CMakeFiles/caffe2ncnn.dir/caffe.pb.cc.o
[  9%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_resize.cpp.o
[  9%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_rotate.cpp.o
[  9%] Building CXX object tools/onnx/CMakeFiles/onnx2ncnn.dir/onnx.pb.cc.o
[ 10%] Building CXX object src/CMakeFiles/ncnn.dir/modelbin.cpp.o
[ 10%] Building CXX object src/CMakeFiles/ncnn.dir/net.cpp.o
[ 11%] Building CXX object src/CMakeFiles/ncnn.dir/opencv.cpp.o
[ 11%] Building CXX object src/CMakeFiles/ncnn.dir/option.cpp.o
[ 12%] Building CXX object src/CMakeFiles/ncnn.dir/paramdict.cpp.o
[ 12%] Building CXX object src/CMakeFiles/ncnn.dir/pipeline.cpp.o
[ 12%] Building CXX object src/CMakeFiles/ncnn.dir/benchmark.cpp.o
[ 13%] Building CXX object src/CMakeFiles/ncnn.dir/layer/absval.cpp.o
[ 13%] Building CXX object src/CMakeFiles/ncnn.dir/layer/batchnorm.cpp.o
[ 14%] Building CXX object src/CMakeFiles/ncnn.dir/layer/bias.cpp.o
[ 14%] Building CXX object src/CMakeFiles/ncnn.dir/layer/bnll.cpp.o
[ 15%] Building CXX object src/CMakeFiles/ncnn.dir/layer/concat.cpp.o
[ 15%] Building CXX object src/CMakeFiles/ncnn.dir/layer/convolution.cpp.o
[ 16%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86.cpp.o
[ 16%] Building CXX object src/CMakeFiles/ncnn.dir/layer/crop.cpp.o
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp: In member function ‘void ncnn::Crop::resolve_crop_roi(const ncnn::Mat&, const ncnn::Mat&, int&, int&, int&, int&, int&, int&) const’:
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:457:9: warning: unused variable ‘w’ [-Wunused-variable]
     int w = bottom_blob.w;
         ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:458:9: warning: unused variable ‘h’ [-Wunused-variable]
     int h = bottom_blob.h;
         ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp: In member function ‘void ncnn::Crop::resolve_crop_roi(const ncnn::Mat&, const int*, int&, int&, int&, int&, int&, int&) const’:
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:492:9: warning: unused variable ‘w’ [-Wunused-variable]
     int w = bottom_blob.w;
         ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:493:9: warning: unused variable ‘h’ [-Wunused-variable]
     int h = bottom_blob.h;
         ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:494:9: warning: unused variable ‘channels’ [-Wunused-variable]
     int channels = bottom_blob.c;
         ^
In file included from /data/lingfan/project/IoT/ncnn/src/layer.h:23:0,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.h:18,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:15:
/data/lingfan/project/IoT/ncnn/src/mat.h: In member function ‘virtual int ncnn::Crop::forward(const std::vector<ncnn::Mat>&, std::vector<ncnn::Mat>&, const ncnn::Option&) const’:
/data/lingfan/project/IoT/ncnn/src/mat.h:881:19: warning: ‘_outw’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (dims == 1 && w == _w && elemsize == _elemsize && elempack == 1 && allocator == _allocator)
                   ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:194:9: note: ‘_outw’ was declared here
     int _outw, _outh, _outc;
         ^
In file included from /data/lingfan/project/IoT/ncnn/src/layer.h:23:0,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.h:18,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:15:
/data/lingfan/project/IoT/ncnn/src/mat.h:955:25: warning: ‘_outh’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     cstep = alignSize(w * h * elemsize, 16) / elemsize;
                         ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:194:16: note: ‘_outh’ was declared here
     int _outw, _outh, _outc;
                ^
In file included from /data/lingfan/project/IoT/ncnn/src/layer.h:23:0,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.h:18,
                 from /data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:15:
/data/lingfan/project/IoT/ncnn/src/mat.h:1175:61: warning: ‘_coffset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     return Mat(w, h, channels, (unsigned char*)data + cstep * _c * elemsize, elemsize, elempack, allocator);
                                                             ^
/data/lingfan/project/IoT/ncnn/src/layer/crop.cpp:193:29: note: ‘_coffset’ was declared here
     int _woffset, _hoffset, _coffset;
                             ^
[ 17%] Building CXX object src/CMakeFiles/ncnn.dir/layer/deconvolution.cpp.o
[ 17%] Building CXX object src/CMakeFiles/ncnn.dir/layer/dropout.cpp.o
[ 18%] Linking CXX executable onnx2ncnn
[ 19%] Building CXX object src/CMakeFiles/ncnn.dir/layer/eltwise.cpp.o
[ 19%] Built target onnx2ncnn
nihui commented 3 months ago

try the latest ncnn source :)