由于需要,把tensorflow-gpu1.3版本升级成了tensorflow-gpu1.4,之后运行代码报错undefined symbol: _ZTIN10tensorflow8OpKernelE,在网上查到说要改Makefile,
我在makefile文件中加了TF_LIB那一行并在下面加入$TF_LIB -ltensorflow_framework -D GOOGLE_CUDA=1 \-fPIC
却报错
是不是我哪里改的不对呢,应该怎么改呢,或者还有没有别的方法解决undefined symbol: _ZTIN10tensorflow8OpKernelE呢?
这是我的makefile文件:
nvcc = /usr/local/cuda-8.0/bin/nvcc cudalib = /usr/local/cuda-8.0/lib64/ tensorflow =/home/yao/anaconda2/envs/tensorflow-gpu/lib/python2.7/site-packages/tensorflow/include all: utils/tf_ops/cd/tf_nndistance_so.so utils/show_3d/render_balls_so.so utils/tf_ops/emd/tf_auctionmatch_so.so .PHONY : all utils/tf_ops/cd/tf_nndistance_so.so: utils/tf_ops/cd/tf_nndistance_g.cu.o utils/tf_ops/cd/tf_nndistance.cpp g++ -std=c++11 utils/tf_ops/cd/tf_nndistance.cpp utils/tf_ops/cd/tf_nndistance_g.cu.o -o utils/tf_ops/cd/tf_nndistance_so.so -shared -fPIC -I $(tensorflow) -lcudart -L $(cudalib) -O2 -D_GLIBCXX_USE_CXX11_ABI=0 utils/tf_ops/cd/tf_nndistance_g.cu.o: utils/tf_ops/cd/tf_nndistance_g.cu $(nvcc) -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o utils/tf_ops/cd/tf_nndistance_g.cu.o utils/tf_ops/cd/tf_nndistance_g.cu -I $(tensorflow) -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2 utils/show_3d/render_balls_so.so: utils/show_3d/render_balls_so.cpp g++ -std=c++11 utils/show_3d/render_balls_so.cpp -o utils/show_3d/render_balls_so.so -shared -fPIC -O2 -D_GLIBCXX_USE_CXX11_ABI=0 utils/tf_ops/emd/tf_auctionmatch_so.so: utils/tf_ops/emd/tf_auctionmatch_g.cu.o utils/tf_ops/emd/tf_auctionmatch.cpp g++ -std=c++11 utils/tf_ops/emd/tf_auctionmatch.cpp utils/tf_ops/emd/tf_auctionmatch_g.cu.o -o utils/tf_ops/emd/tf_auctionmatch_so.so -shared -fPIC -I $(tensorflow) -lcudart -L $(cudalib) -O2 -D_GLIBCXX_USE_CXX11_ABI=0 utils/tf_ops/emd/tf_auctionmatch_g.cu.o: utils/tf_ops/emd/tf_auctionmatch_g.cu $(nvcc) -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o utils/tf_ops/emd/tf_auctionmatch_g.cu.o utils/tf_ops/emd/tf_auctionmatch_g.cu -I $(tensorflow) -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2 -arch=sm_30
求救大神该怎么改呀