custom_ops
custom_ops copied to clipboard
nvlink fatal : Could not open input file '/usr/lib/x86_64-linux-gnu/librt.a'
Hi, while compiling the repo, I'm getting following error:
nvlink fatal : Could not open input file '/usr/lib/x86_64-linux-gnu/librt.a'
make[2]: *** [CMakeFiles/ops.dir/build.make:132: CMakeFiles/ops.dir/cmake_device_link.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ops.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
but if I remove ${CUDA_LIBRARIES}
from target_link_libraries
in cmake file then I'm able to build it successfully. But while loading the file I'm getting error:
>>> import tensorflow as tf
>>> custom_ops = tf.load_op_library('./libops.so')
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vedanshu/.local/lib/python3.10/site-packages/tensorflow/python/framework/load_library.py", line 54, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./libops.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringB5cxx11ERKNS_15OpKernelContextEb
I'm using python3.10.4, gcc 9.4.0 and tensorflow 2.8.0.