lherman-cs / tensorflow-aarch64

Compiled tensorflow for aarch64 architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is this TF_BINARY compiled with CPU? or GPU?

TodyWoo opened this issue · comments

Hello,I am building tensorflow for aarch64 Architecture,but always failed。So I want to kown this TF_BINARY is CPU version or GPU version?thank you for your reply。

this one is the CPU version. What kind of error did you get?

I am glad to received your reply,I downloaded this TF_BINARY,and installed it off-line(The server can not be networked),Python-V is 3.5.After sucessffully installed python dependent packages,such as wheel,pbr,numpy.When i installed python dependent packages named tensorflow_tensorboard-0.4.0rc1-py3-none-any.whl,which from curl:https://pypi.python.org/pypi/tensorflow-tensorboard/0.4.0rc1,return Error like this:
$python3 -m pip install tensorflow_tensorboard-0.4.0rc1-py3-none-any.whl
Traceback (most recent call last):
File "/usr/python/lib/python3.5/runpy.py ", line 151, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/python/lib/python3.5/runpy.py ", line 118, in _get_module_details
return _get_module_details(pkg_main_name)
File "/usr/python/lib/python3.5/runpy.py ", line 104, in _get_module_details
spec = importlib.util.find_spec(mod_name)
File "/usr/python/lib/python3.5/importlib/util.py ", line 88, in find_spec
parent = import(parent_name, fromlist=['path'])
File "/usr/python/lib/python3.5/site-packages/pip/init.py", line 15, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/python/lib/python3.5/site-packages/pip/vcs/subversion.py ", line 9, in
from pip.index import Link
File "/usr/python/lib/python3.5/site-packages/pip/index.py ", line 30, in
from pip.wheel import Wheel, wheel_ext
File "/usr/python/lib/python3.5/site-packages/pip/wheel.py ", line 6, in
import compileall
File "/usr/python/lib/python3.5/compileall.py ", line 20, in
from concurrent.futures import ProcessPoolExecutor
File "/usr/python/lib/python3.5/site-packages/futures-3.1.1-py3.5.egg/concurrent/futures/init.py", line 8, in from concurrent.futures._base import (FIRST_COMPLETED,
File "/usr/python/lib/python3.5/site-packages/futures-3.1.1-py3.5.egg/concurrent/futures/_base.py ", line 381
raise exception_type, self._exception, self._traceback
^
SyntaxError: invalid syntax

Next,when I executed command "python3 -m pip install tensorflow_1.4.0rc0-cp35-cp35m-linux_aarch64.whl",It is returned above same Error.

Finally,I want to installed tensorflow from source,but always compiled failed. Where can I get the original source code version that you compiled successful?And how to modify the source code to installed tensorflow for aarch64 architecture successfull!

Can you try to remove all dependencies that you've installed? Then, try to directly execute the installation command:

python3 -m pip install tensorflow_1.4.0rc0-cp35-cp35m-linux_aarch64.whl

I'm worried that there are some mismatched dependencies since you installed them manually. The command that I gave should install the dependencies automatically.

For building tensorflow from the source code, it is very tedious. I took my single board 2 days to complete the build. Sometimes, I needed to adjust the resource configurations to make it works. But, here's the link from the official tensorflow website how to build it: https://www.tensorflow.org/install/install_sources

I'm sorry. I didn't see that your server can't be networked. That's why you have to install the dependencies manually. Here's the list of the dependencies that you need to install.

bleach==1.5.0
enum34==1.1.6
html5lib==0.9999999
Markdown==2.6.9
numpy==1.13.3
protobuf==3.4.0
six==1.11.0
tensorflow==1.4.0rc0
tensorflow-tensorboard==0.1.8
Werkzeug==0.12.2

For a side note, if you build tensorflow from the source, you'll end up with the same wheel. That also means you still have to go through installing the dependencies which is the root cause of your error. So, I would highly recommend you to install my tensorflow wheel and try to solve the dependency issues.

thanks,which python-Version is used

It is python 3.5

So I can not find the dependency tensorflow-tensorboard.Can you help me to find it?thank you.

I have installed it successful but received ImportError as follow when import tensorflow.

import tensorflow
Traceback (most recent call last):
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/python35/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/python35/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/linaro/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/python35/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/python35/lib/python3.5/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/python35/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/python35/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/python35/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/linaro/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/python35/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

It seems like you're missing some c++ shared libraries. The problem is it is dynamically compiled. So, it will look for shared object libraries in your system and link it. I don't know the solution yet. But, I'll try to figure out why that can happen.

I think the problem lies on your gcc version. Your gcc might be older than mine. So, your system doesn't have the needed shared libraries. I've updated the readme. Now, you can see the gcc version and the OS I used to build it.

Thanks,So may I understanding what did you say means that,I should update my GCC version and re-build tensorflow again? or need not re-build tensorflow again?

You don't need to rebuild your tensorflow. You just need to update your gcc. The linking process for dynamically compiled programs is happening during the execution.