Elffuss BraidHub

kikocis/ncnn public

master · 4.4 KiBSourceRawPermalink

For some reason, if you're not happy with the binary size of the ncnn library, then here is the cheatsheet that helps you to build a minimal ncnn :P

disable c++ rtti and exceptions

cmake -DNCNN_DISABLE_RTTI=ON -DNCNN_DISABLE_EXCEPTION=ON ..

disable vulkan support

cmake -DNCNN_VULKAN=OFF ..

disable NCNN_STDIO

cmake -DNCNN_STDIO=OFF ..

disable NCNN_STRING

cmake -DNCNN_STRING=OFF ..

disable NCNN_BF16

cmake -DNCNN_BF16=OFF ..

disable NCNN_INT8

cmake -DNCNN_INT8=OFF ..

drop pixel drawing functions

cmake -DNCNN_PIXEL_DRAWING=OFF ..

drop pixel rotate and affine functions

cmake -DNCNN_PIXEL_ROTATE=OFF -DNCNN_PIXEL_AFFINE=OFF ..

drop pixel functions

cmake -DNCNN_PIXEL=OFF ..

disable openmp

cmake -DNCNN_OPENMP=OFF ..

disable avx2 and arm82 optimized kernel

cmake -DNCNN_AVX2=OFF -DNCNN_ARM82=OFF ..

disable runtime cpu instruction dispatch

cmake -DNCNN_RUNTIME_CPU=OFF ..

drop layers not used

cmake -DWITH_LAYER_absval=OFF -DWITH_LAYER_bnll=OFF ..

disable c++ stl

cmake -DNCNN_SIMPLESTL=ON ..

drop optimized kernel not used

drop operators from BinaryOp UnaryOp