Skip to content

undefined symbol: _ZTIN10tensorflow8OpKernelE in Linux Systems and forward compatibility issue with tf.batch_ifft #8

@manupillai308

Description

@manupillai308

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions