Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build tensorflow on jetson nano #8

Closed
PythonImageDeveloper opened this issue Jan 19, 2020 · 3 comments
Closed

build tensorflow on jetson nano #8

PythonImageDeveloper opened this issue Jan 19, 2020 · 3 comments

Comments

@PythonImageDeveloper
Copy link

PythonImageDeveloper commented Jan 19, 2020

I want to build tensorflow-1.14.0 with jetpack4.3, Bazel-0.25.2, protobuf-3.8.0 on jetson nano, I get this error:

ERROR: /home/jnano/.cache/bazel/_bazel_root/11848d91bbe32367362bd23b83211c84/external/local_config_cuda/crosstool/BUILD:24:1: in cc_toolchain_suite rule @local_config_cuda//crosstool:toolchain: cc_toolchain_suite '@local_config_cuda//crosstool:toolchain' does not contain a toolchain for cpu 'aarch64'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis of target '@local_config_cuda//crosstool:toolchain' failed; build aborted
INFO: Elapsed time: 20.502s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (114 packages loaded, 175 targets configured)
currently loading: tensorflow/core/kernels ... (2 packages)

I get the same error using jetpack-4.2.2 for building the TensorFlow-1.12.2, for solving the problem I set to disable for TensorRT configure, correclty build the .whl file:

PYTHON_BIN_PATH=$(which python3)
PYTHON_LIB_PATH=$(python3 -c 'import site; print(site.getsitepackages()[0])')
TF_CUDA_COMPUTE_CAPABILITIES=${cuda_compute}
TF_CUDA_VERSION=10.0
TF_CUDA_CLANG=0
TF_CUDNN_VERSION=7
TF_TENSORRT_VERSION=${trt_version} \ -----> remove this line
CUDA_TOOLKIT_PATH=/usr/local/cuda
CUDNN_INSTALL_PATH=/usr/lib/aarch64-linux-gnu
TENSORRT_INSTALL_PATH=/usr/lib/aarch64-linux-gnu \ ---> remove this line
TF_NEED_IGNITE=0
TF_ENABLE_XLA=0
TF_NEED_OPENCL_SYCL=0
TF_NEED_COMPUTECPP=0
TF_NEED_ROCM=0
TF_NEED_CUDA=1
TF_NEED_TENSORRT=1 \ --- > set to 0
TF_NEED_OPENCL=0
TF_NEED_MPI=0 \

@jkjung-avt
Copy link
Owner

It seems that bazel could not find your CUDA toolchain. Did you add cuda related paths into your ${PATH} and ${LD_LIBRARY_PATH}? Reference:

https://github.com/jkjung-avt/jetson_nano/blob/master/install_basics.sh#L8
https://github.com/jkjung-avt/jetson_nano/blob/master/install_basics.sh#L9

@PythonImageDeveloper
Copy link
Author

PythonImageDeveloper commented Jan 19, 2020

Yes,

jnano@jnano-desktop:~/jetson_nano$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Mon_Mar_11_22:13:24_CDT_2019
Cuda compilation tools, release 10.0, V10.0.326

in the tensorflow folder your Github, have onle tensorflow patch of 1.12.2, 1.15.0, 2.0 versions, How you get these patch files, you created them by yourself?

@jkjung-avt
Copy link
Owner

I referenced other online resources, as well as tensorflow/issues, and created the patch files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants