zhy520xp / mace-makefile-project

makefile 交叉编译 libmace.a,并能在嵌入式端调用GPU来跑深度学习模型
96 stars 18 forks source link

GPU 编译mace.a报错: undefined reference to `mace::kTuningParamsData #16

Open feixuedudiao opened 6 years ago

feixuedudiao commented 6 years ago

++ -O3 -std=c++11 -fpermissive -DMACE_ENABLE_OPENCL -I.. -I../include/protobuf3.4.0 -I../include -I../include/opencl_clhpp -I../include/opencl20 -I../mace -I../mace/publics -c -o ../mace/codegen/opencl/opencl_encrypt_program.o ../mace/codegen/opencl/opencl_encrypt_program.cc g++ -O3 -std=c++11 -fpermissive -DMACE_ENABLE_OPENCL -I.. -I../include/protobuf3.4.0 -I../include -I../include/opencl_clhpp -I../include/opencl20 -I../mace -I../mace/publics -c -o ../mace/codegen/tuning/tuning_params.o ../mace/codegen/tuning/tuning_params.cc ... ... std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::vector<unsigned int, std::allocator > > > >)' ../mace/utils/tuner_production.o:tuner_production.cc:(.text+0x0): first defined here /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference tomain' ../mace/kernels/opencl/helper.o: In function `mace::kernels::TuningOrRun3DKernel(cl::Kernel const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int const, std::vector<unsigned int, std::allocator > const&, mace::StatsFuture)': helper.cc:(.text+0x47cb): undefined reference to mace::kTuningParamsData' helper.cc:(.text+0x47e0): undefined reference tomace::kTuningParamsData' helper.cc:(.text+0x47e7): undefined reference to mace::kTuningParamsData' helper.cc:(.text+0x49a8): undefined reference tomace::kTuningParamsData' ../mace/kernels/opencl/helper.o: In function `mace::kernels::TuningOrRun2DKernel(cl::Kernel const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int const, std::vector<unsigned int, std::allocator > const&, mace::StatsFuture*)': helper.cc:(.text+0x5b2b): undefined reference to mace::kTuningParamsData' ../mace/kernels/opencl/helper.o:helper.cc:(.text+0x5b40): more undefined references tomace::kTuningParamsData' follow

和#1中GPU Demo编译不过: undefined reference to `mace::kTuningParamsData'的问题类似,是不是缺少第三方依赖包?#中描述的将某个函数删掉,但不是很明白。

xiaqing10 commented 6 years ago

看已经关掉的issue