сборка тензорного потока прервана: анализ целевого build_tbb не выполнен - PullRequest
0 голосов
/ 10 января 2020

Я пытаюсь собрать tensorflow из исходного кода для моего Mac, поскольку он поддерживает SSE4.1, SSE4.2, AVX и FMA со следующей официальной документацией (https://www.tensorflow.org/install/source). Я использую ветвь master и следующую команду:

bazel build -c opt --copt=-mavx --copt=-mfma --copt=-msse4.2 --copt=-msse4.1 --copt=-mfpmath=sse --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=mkl --config=ngraph --config=numa --config=noaws --config=nogcp --config=nohdfs --config=nonccl -k //tensorflow/tools/pip_package:build_pip_package

Вот моя конфигурация bazel:

(base) IKA-XK0X8JG5J:tensorflow_build sardarmrinal$ ./configure 
WARNING: Running Bazel server needs to be killed, because the startup options are different.
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 1.2.1 installed.
Please specify the location of python. [Default is /opt/anaconda3/bin/python]: 


Found possible Python library paths:
  /opt/anaconda3/lib/python3.7/site-packages
Please input the desired Python library path to use.  Default is [/opt/anaconda3/lib/python3.7/site-packages]

Do you wish to build TensorFlow with XLA JIT support? [Y/n]: Y
XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: N
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]: N
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: N
No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: N
Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]: 


Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N
Not configuring the WORKSPACE for Android builds.

Do you wish to build TensorFlow with iOS support? [y/N]: N
No iOS support will be enabled for TensorFlow.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
    --config=mkl            # Build with MKL support.
    --config=monolithic     # Config for mostly static monolithic build.
    --config=ngraph         # Build with Intel nGraph support.
    --config=numa           # Build with NUMA support.
    --config=dynamic_kernels    # (Experimental) Build kernels into separate shared objects.
    --config=v2             # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
    --config=noaws          # Disable AWS S3 filesystem support.
    --config=nogcp          # Disable GCP support.
    --config=nohdfs         # Disable HDFS support.
    --config=nonccl         # Disable NVIDIA NCCL support.
Configuration finished

И я получаю следующую ошибку:

ERROR: /private/var/tmp/_bazel_sardarmrinal/841c8c9a203505f6ff7b50ea63697e9e/external/tbb/BUILD.bazel:12:1: in cmd attribute of genrule rule @tbb//:build_tbb: $(AR) not defined
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis of target '@tbb//:build_tbb' failed; build aborted

Есть идеи, как мне справиться с этим?

К вашему сведению: вчера я успешно его построил без --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" и на этот раз хотел использовать эту опцию. Все, что я сделал, это потянул последнюю ветку master.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...