Skip to content

"undefined symbol" error when trying to import opengl rasterize #704

@jenkspt

Description

@jenkspt

Environment:
python==3.10
tensorflow==2.10.0

tensorflow_graphics==2021.12.2
(also tried with nightly 2022.9.6)

Ubuntu 20.04.5 LTS
CUDA Version: 11.8
Driver Version: 520.61.05

>>> from tensorflow_graphics.rendering.opengl.rasterization_backend import rasterize
2022-10-27 13:22:59.773129: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-10-27 13:23:00.420227: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2022-10-27 13:23:01.339306: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2022-10-27 13:23:01.339417: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory
2022-10-27 13:23:01.339433: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
File ~/anaconda3/envs/tfg/lib/python3.10/site-packages/tensorflow_graphics/rendering/opengl/rasterization_backend.py:26
     25 try:
---> 26   from tensorflow_graphics.rendering.opengl import gen_rasterizer_op as render_ops
     27 except ImportError:

ImportError: cannot import name 'gen_rasterizer_op' from 'tensorflow_graphics.rendering.opengl' (/home/penn/anaconda3/envs/tfg/lib/python3.10/site-packages/tensorflow_graphics/rendering/opengl/__init__.py)

During handling of the above exception, another exception occurred:

NotFoundError                             Traceback (most recent call last)
Cell In [1], line 1
----> 1 from tensorflow_graphics.rendering.opengl.rasterization_backend import rasterize

File ~/anaconda3/envs/tfg/lib/python3.10/site-packages/tensorflow_graphics/rendering/opengl/rasterization_backend.py:30
     28   import os
     29   dir_path = os.path.dirname(os.path.abspath(__file__))
---> 30   render_ops = tf.load_op_library(os.path.join(dir_path, "rasterizer_op.so"))
     31 # pylint: enable=g-import-not-at-top
     34 def _dim_value(dim: Optional[int] = None) -> int:

File ~/anaconda3/envs/tfg/lib/python3.10/site-packages/tensorflow/python/framework/load_library.py:54, in load_op_library(library_filename)
     31 @tf_export('load_op_library')
     32 def load_op_library(library_filename):
     33   """Loads a TensorFlow plugin, containing custom ops and kernels.
     34 
     35   Pass "library_filename" to a platform-specific mechanism for dynamically
   (...)
     52     RuntimeError: when unable to load the library or get the python wrappers.
     53   """
---> 54   lib_handle = py_tf.TF_LoadLibrary(library_filename)
     55   try:
     56     wrappers = _pywrap_python_op_gen.GetPythonWrappers(
     57         py_tf.TF_GetOpList(lib_handle))

NotFoundError: /home/penn/anaconda3/envs/tfg/lib/python3.10/site-packages/tensorflow_graphics/rendering/opengl/rasterizer_op.so: undefined symbol: _ZNK10tensorflow15shape_inference16InferenceContext5inputEN4absl12lts_2021110211string_viewEPSt6vectorINS0_11ShapeHandleESaIS6_EE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions