compact-bilinear-pooling-tf
compact-bilinear-pooling-tf copied to clipboard
undefined symbol: _ZTIN10tensorflow8OpKernelE in Linux Systems and forward compatibility issue with tf.batch_ifft
Anybody facing the issue, the build.sh file should be changed to below given script.
#!/usr/bin/env bash
echo Building Native ops...
TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_CFLAGS=( $(python3 -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
TF_LFLAGS=( $(python3 -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )
# TODO: GPU support
#nvcc -std=c++11 -c -o count_sketch.cu.o count_sketch.cu.cc -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -D_MWAITXINTRIN_H_INCLUDED -g
#g++ -std=c++11 -shared -o count_sketch.so count_sketch.cc count_sketch.cu.o -fPIC -lcudart -I $TF_INC -D_GLIBCXX_USE_CXX11_ABI=0 -g
mkdir -p build
g++ -std=c++11 -shared -o build/count_sketch.so ops/count_sketch.cc -fPIC -I $TF_INC -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2
Also, the count_sketch.py file must be edited by changing tf.batch_ifft
and tf.batch_fft
to tf.ifft
and tf.fft
respectively for support with latest versions of tensorflow.