VoVAllen / tf-dlpack

DLPack for Tensorflow
Apache License 2.0
36 stars 4 forks source link

[ERROR] import tfdlpack #8

Closed curiosityyy closed 4 years ago

curiosityyy commented 4 years ago

(dgl-tf) byli@proj55:~/dgl/examples/tensorflow/gcn$ python Python 3.7.5 (default, Oct 25 2019, 15:51:11) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.

import dlpack Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'dlpack' import tfdlpack Traceback (most recent call last): File "", line 1, in File "/home/byli/.conda/envs/dgl-tf/lib/python3.7/site-packages/tfdlpack/init.py", line 2, in from .core import version, to_dlpack, from_dlpack, get_device_and_dtype File "/home/byli/.conda/envs/dgl-tf/lib/python3.7/site-packages/tfdlpack/core.py", line 13, in dlpack_ops = load_library.load_op_library(libinfo.find_lib_path()[0]) File "/home/byli/.conda/envs/dgl-tf/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 61, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename) tensorflow.python.framework.errors_impl.NotFoundError: /home/byli/.conda/envs/dgl-tf/lib/python3.7/site-packages/tfdlpack/libtfdlpack.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

curiosityyy commented 4 years ago

when I import tfdlpack, I got this error.

jermainewang commented 4 years ago

What's the version of your tensorflow?

curiosityyy commented 4 years ago

tensorflow-estimator 2.0.1 tensorflow-gpu 2.0.0 tfdlpack-gpu 0.1

Minjie Wang notifications@github.com 于2019年12月12日周四 下午11:15写道:

What's the version of your tensorflow?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/VoVAllen/tf-dlpack/issues/8?email_source=notifications&email_token=AGYIXXUYXZSXVCVPDHG5MTTQYJIRTA5CNFSM4JZ7W2BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGW7OVQ#issuecomment-565049174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGYIXXR4URFVBD5OEXVPZKDQYJIRTANCNFSM4JZ7W2BA .

curiosityyy commented 4 years ago

(dgl-tf) byli@proj55:~/.conda/envs/dgl-tf/lib/python3.7/site-packages/tfdlpack$ ldd /data/home/byli/.conda/envs/dgl-tf/lib/python3.7/site-packages/tfdlpack/libtfdlpack.so linux-vdso.so.1 (0x00007ffeda526000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faf17db8000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faf17bb4000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007faf179ac000) libtensorflow_framework.so.2 => not found libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007faf17623000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faf1740b000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faf1701a000) /lib64/ld-linux-x86-64.so.2 (0x00007faf18269000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faf16c7c000)

curiosityyy commented 4 years ago

I change the LD_LIBRARY_PATH, and now libtensorflow_framework.so.2 is found. But the error still occurs.

jermainewang commented 4 years ago

@curiosityyy The problem should be fixed in #9 and a new release v0.1.1 has been pushed. Please upgrade tfdlpack and let us know if anything is wrong.

curiosityyy commented 4 years ago

Thanks. Now it works.

kimjh12 commented 4 years ago

This problem still occurs with v0.1.3, anyway solved by reinstalling tensorflow with pip rather than conda.

VoVAllen commented 4 years ago

@kimjh12 dlpack is now supported in the official tensorflow. You can get it by tf.experimental.dlpack.to_dlpack/from_dlpack. I suggest using the latest nightly build, or at least 2.2 version.