memory_probe_ops icon indicating copy to clipboard operation
memory_probe_ops copied to clipboard

load_op_library error

Open fatmas1982 opened this issue 6 years ago • 8 comments

When i run memory-probe-examples.ipynb file this error displayed in In[2] import urllib.request response = urllib.request.urlopen("https://raw.githubusercontent.com/yaroslavvb/memory_probe_ops/master/linux.memory_probe_ops.so") open("memory_probe_ops.so", "wb").write(response.read()) memory_probe_ops = tf.load_op_library("./memory_probe_ops.so")

NotFoundError Traceback (most recent call last) in () 2 response = urllib.request.urlopen("https://raw.githubusercontent.com/yaroslavvb/memory_probe_ops/master/linux.memory_probe_ops.so") 3 open("memory_probe_ops.so", "wb").write(response.read()) ----> 4 memory_probe_ops = tf.load_op_library("./memory_probe_ops.so")

~/.local/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename) 54 """ 55 with errors_impl.raise_exception_on_not_ok_status() as status: ---> 56 lib_handle = py_tf.TF_LoadLibrary(library_filename, status) 57 58 op_list_str = py_tf.TF_GetOpList(lib_handle)

~/.local/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py in exit(self, type_arg, value_arg, traceback_arg) 471 None, None, 472 compat.as_text(c_api.TF_Message(self.status.status)), --> 473 c_api.TF_GetCode(self.status.status)) 474 # Delete the underlying status object from memory otherwise it stays alive 475 # as there is a reference to status from this from the traceback due to

NotFoundError: ./memory_probe_ops.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

fatmas1982 avatar Dec 05 '17 19:12 fatmas1982

I moved these ops into main Tensorflow, memory_ops.bytes_in_use

yaroslavvb avatar Dec 05 '17 19:12 yaroslavvb

could you clear me which is memory_ops.bytes_in_use and how i should do to use?

fatmas1982 avatar Dec 05 '17 19:12 fatmas1982

Sorry I'm on my phone, please search for it in to githib repo

yaroslavvb avatar Dec 05 '17 19:12 yaroslavvb

ok ,from this link https://github.com/yaroslavvb/memory_probe_ops I am trying to do TF_INC=$(python3.5 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') g++ -std=c++11 -shared memory_probe_ops.cc -o memory_probe_ops.so -fPIC -I $TF_INC -O2

Error

Singularity.tf-gpu.img> g++ -std=c++11 -shared memory_probe_ops.cc -o memory_probe_ops.so -fPIC -I $TF_INC -O2 In file included from /usr/include/limits.h:25:0, from /eb/software/GCCcore/6.3.0/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include-fixed/limits.h:168, from /eb/software/GCCcore/6.3.0/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include-fixed/syslimits.h:7, from /eb/software/GCCcore/6.3.0/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include-fixed/limits.h:34, from memory_probe_ops.cc:1: /usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory # include <sys/cdefs.h> ^ compilation terminated.

What should I do ?

fatmas1982 avatar Dec 05 '17 20:12 fatmas1982

Don't use this package, this package is deprecated, use the native.tensorflow op as I mentioned in prev msg

yaroslavvb avatar Dec 05 '17 20:12 yaroslavvb

I am trying to search about memory_ops.bytes_in_use as you mentioned but i cant arrive could you give me more details ??

fatmas1982 avatar Dec 06 '17 13:12 fatmas1982

Hi @yaroslavvb, I tried to use your utility for TensorFlow Kernel Probe. I'm facing an error while running python3 test_memory_probe.py I encounter the error: tensorflow.python.framework.errors_impl.NotFoundError: ./memory_probe_ops.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

I build the code using command mention in Repository. I want to see the memory allocation and consumption of TensorFlow. If you know any other utility kindly let me know.

I'm using:

Ubuntu 16.04.5 LTS TensorFlow 1.13

Kindly tell me what am I doing wrong

mirza03 avatar Apr 04 '19 10:04 mirza03

You may need to use an older version, I'm not sure what is their recommendation for custom ops now

On Thu, Apr 4, 2019 at 3:48 AM Awais Mirza [email protected] wrote:

Hi @yaroslavvb https://github.com/yaroslavvb, I tried to use your utility for TensorFlow Kernel Probe. I'm facing an error while running python3 test_memory_probe.py I encounter the error: tensorflow.python.framework.errors_impl.NotFoundError: ./memory_probe_ops.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

I build the code using command mention in Repository. I want to see the memory allocation and consumption of TensorFlow. If you know any other utility kindly let me know.

I'm using:

Ubuntu 16.04.5 LTS TensorFlow 1.13

Kindly tell me what am I doing wrong

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yaroslavvb/memory_probe_ops/issues/2#issuecomment-479847849, or mute the thread https://github.com/notifications/unsubscribe-auth/AABaHBJEW0qz1VQVGBUVodNfvCJUetkgks5vddh4gaJpZM4Q2zwA .

yaroslavvb avatar Apr 04 '19 16:04 yaroslavvb