tomheaven / tensorflow-osx-build Goto Github PK
View Code? Open in Web Editor NEWOff-the-shelf python package of tensorflow with CUDA support for Mac OS.
Off-the-shelf python package of tensorflow with CUDA support for Mac OS.
你好,请问有为python3.5或者3.6编译的嘛?
when installation is done I got this message error (pytorch installation works perfectly)
here an example testcase with tensorflow-1.12.0-py27-py36-py37-cuda10-cudnn74 wheel:
python37
export PATH=/Developer/NVIDIA/CUDA-10.0/bin:$PATH
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-10.0/lib:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib/:$DYLD_LIBRARY_PATH
export CPATH=/usr/local/cuda/include:$CPATH
https://github.com/flyyufelix/DenseNet-Keras
$ python3 test_inference.py
Using TensorFlow backend.
/Users/guillaumegodin/Downloads/DenseNet-Keras/densenet121.py:45: UserWarning: Update your Conv2D
call to the Keras 2 API: Conv2D(64, (7, 7), name="conv1", strides=(2, 2), use_bias=False)
x = Convolution2D(nb_filter, 7, 7, subsample=(2, 2), name='conv1', bias=False)(x)
2019-01-27 16:20:03.688741: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] OS X does not support NUMA - returning NUMA node zero
2019-01-27 16:20:03.689610: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
name: GeForce GT 750M major: 3 minor: 0 memoryClockRate(GHz): 0.9255
pciBusID: 0000:01:00.0
totalMemory: 2.00GiB freeMemory: 16.59MiB
2019-01-27 16:20:03.689643: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2019-01-27 16:20:06.003836: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-27 16:20:06.003869: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0
2019-01-27 16:20:06.003877: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N
2019-01-27 16:20:06.005312: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5 MB memory) -> physical GPU (device: 0, name: GeForce GT 750M, pci bus id: 0000:01:00.0, compute capability: 3.0)
Illegal instruction: 4
as title, curious about this.
@TomHeaven 想问一下,你下面这个issue是如何解决的
我的环境
macOS 10.13.6
Xcode 10.1
CUDA 10.1
cuDNN 7.6.5
我看你在这个帖子里也在讨论: #18
在tensorflow/tensorflow#40260
里面提到用环境变量,我尝试过,但仍然报错
ERROR: /Users/llv23/Documents/05_machine_learning/dl_gpu_mac/crack_by_TomHeaven/tensorflow-2.3.0-macos/tensorflow/stream_executor/cuda/BUILD:457:1: C++ compilation of rule '//tensorflow/stream_executor/cuda:cusparse_stub' failed (Exit 1)
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7786:21: error: unknown type name 'cusparseSpVecDescr_t'
cusparseCreateSpVec(cusparseSpVecDescr_t *spVecDescr, int64_t size, int64_t nnz,
^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7790:7: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
cusparseSpVecDescr_t *, int64_t, int64_t, void *, void *,
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7799:22: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
cusparseDestroySpVec(cusparseSpVecDescr_t spVecDescr) {
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7800:51: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
using FuncPtr = cusparseStatus_t(CUSPARSEAPI *)(cusparseSpVecDescr_t);
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7807:11: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
const cusparseSpVecDescr_t spVecDescr, int64_t *size, int64_t *nnz,
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7811:13: error: C++ requires a type specifier for all declarations
const cusparseSpVecDescr_t, int64_t *, int64_t *, void **, void **,
~~~~~ ^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7815:19: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const cusparseSpMatDescr_t' (aka 'cusparseSpMatDescr *const')
return func_ptr(spVecDescr, size, nnz, indices, values, idxType, idxBase,
^~~~~~~~~~
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7820:11: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
const cusparseSpVecDescr_t spVecDescr, cusparseIndexBase_t *idxBase) {
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7821:57: error: C++ requires a type specifier for all declarations
using FuncPtr = cusparseStatus_t(CUSPARSEAPI *)(const cusparseSpVecDescr_t,
~~~~~ ^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7825:19: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const cusparseSpMatDescr_t' (aka 'cusparseSpMatDescr *const')
return func_ptr(spVecDescr, idxBase);
^~~~~~~~~~
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7829:30: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
cusparseSpVecGetValues(const cusparseSpVecDescr_t spVecDescr, void **values) {
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7831:45: error: C++ requires a type specifier for all declarations
cusparseStatus_t(CUSPARSEAPI *)(const cusparseSpVecDescr_t, void **);
~~~~~ ^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7834:19: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const cusparseSpMatDescr_t' (aka 'cusparseSpMatDescr *const')
return func_ptr(spVecDescr, values);
^~~~~~~~~~
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7838:24: error: unknown type name 'cusparseSpVecDescr_t'; did you mean 'cusparseSpMatDescr_t'?
cusparseSpVecSetValues(cusparseSpVecDescr_t spVecDescr, void *values) {
^~~~~~~~~~~~~~~~~~~~
cusparseSpMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6964:36: note: 'cusparseSpMatDescr_t' declared here
typedef struct cusparseSpMatDescr* cusparseSpMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7839:51: error: C++ requires a type specifier for all declarations
using FuncPtr = cusparseStatus_t(CUSPARSEAPI *)(cusparseSpVecDescr_t, void *);
^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7842:19: error: cannot initialize a parameter of type 'int' with an lvalue of type 'cusparseSpMatDescr_t' (aka 'cusparseSpMatDescr *')
return func_ptr(spVecDescr, values);
^~~~~~~~~~
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7846:21: error: unknown type name 'cusparseDnVecDescr_t'
cusparseCreateDnVec(cusparseDnVecDescr_t *dnVecDescr, int64_t size,
^
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7849:7: error: unknown type name 'cusparseDnVecDescr_t'; did you mean 'cusparseDnMatDescr_t'?
cusparseDnVecDescr_t *, int64_t, void *, cudaDataType);
^~~~~~~~~~~~~~~~~~~~
cusparseDnMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6965:36: note: 'cusparseDnMatDescr_t' declared here
typedef struct cusparseDnMatDescr* cusparseDnMatDescr_t;
^
In file included from tensorflow/stream_executor/cuda/cusparse_stub.cc:59:
./tensorflow/stream_executor/cuda/cusparse_10_1.inc:7856:22: error: unknown type name 'cusparseDnVecDescr_t'; did you mean 'cusparseDnMatDescr_t'?
cusparseDestroyDnVec(cusparseDnVecDescr_t dnVecDescr) {
^~~~~~~~~~~~~~~~~~~~
cusparseDnMatDescr_t
bazel-out/darwin-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h:6965:36: note: 'cusparseDnMatDescr_t' declared here
typedef struct cusparseDnMatDescr* cusparseDnMatDescr_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
我的环境变量如下:
(base) Orlando:~ llv23$ env
CONDA3_HOME=/Users/llv23/miniconda3
SPARK_HOME=/usr/local/Cellar/spark
rvm_bin_path=/Users/llv23/.rvm/bin
TERM_PROGRAM=Apple_Terminal
DYLD_FALLBACK_LIBRARY_PATH=/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-10.1/lib:/usr/local/cuda/extras/CUPTI/lib:/usr/local/opt/boost-python3/lib:/usr/local/lib
MONOGACPREFIX=/usr/local
GEM_HOME=/Users/llv23/.rvm/gems/ruby-2.2.1
SHELL=/bin/bash
TERM=xterm-256color
HADOOP_HOME=/Users/llv23/Documents/00_devbase/04_hadoop/hadoop-2.7.3-build
PROTO_HOME=/usr/local/opt/[email protected]
IRBRC=/Users/llv23/.rvm/rubies/ruby-2.2.1/.irbrc
TMPDIR=/var/folders/p8/91_v9_9d12q9wmlydb406rbr0000gn/T/
CONDA_SHLVL=1
GRADLE_HOME=/usr/local/Cellar/gradle/4.4.1
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.XZkcTSZp6r/Render
CONDA_PROMPT_MODIFIER=(base)
TERM_PROGRAM_VERSION=404
OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
KAGGLE_CLI=~/.local/bin
MONGODB_HOME=/Users/llv23/Documents/orlando_innovation/homekits_sol/mongodb
MY_RUBY_HOME=/Users/llv23/.rvm/rubies/ruby-2.2.1
TERM_SESSION_ID=E38C7210-4C8B-412B-B9F9-F427A7101663
LC_ALL=en_US.UTF-8
OPENSSL_HOME=/usr/local/opt/openssl
CAFFE_HOME=/Users/llv23/Documents/05_machine_learning/dl_gpu_mac/caffe
CUDA_HOME=/usr/local/cuda
USER=llv23
LD_LIBRARY_PATH=/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-10.1/lib:/usr/local/nccl/lib:/usr/local/cuda/extras/CUPTI/lib:/usr/local/opt/boost-python3/lib:/usr/local/opt/open-mpi/lib:/Users/llv23/miniconda3/lib:/usr/local/opt/open-mpi/lib:/usr/local/lib
OCTAVE_BIN=/Applications/Octave.app/Contents/Resources/usr/bin
_system_type=Darwin
CONDA_EXE=/Users/llv23/opt/miniconda3/bin/conda
rvm_path=/Users/llv23/.rvm
MONO_HOME=/usr/local/Cellar/mono/5.4.1.6
PROTOBUF_HOME=/usr/local/protobuf
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.u5DZAObZFN/Listeners
_CE_CONDA=
rvm_prefix=/Users/llv23
PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/llv23/opt/miniconda3/bin:/Users/llv23/opt/miniconda3/condabin:~/.local/bin:/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-10.1/lib:/usr/local/nccl/lib:/usr/local/cuda/extras/CUPTI/lib:/usr/local/opt/boost-python3/lib:/usr/local/opt/open-mpi/lib:/usr/local/Cellar/spark/bin:/usr/local/sbin:/usr/local/cuda/bin:/Developer/NVIDIA/CUDA-10.1/bin:/opt/local/bin:/opt/local/sbin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Users/llv23/miniconda3/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/openssl/bin:/usr/local/opt/node@6/bin:/usr/local/share/dotnet:/Users/llv23/.rvm/gems/ruby-2.2.1/bin:/Users/llv23/.rvm/gems/ruby-2.2.1@global/bin:/Users/llv23/.rvm/rubies/ruby-2.2.1/bin:/Users/llv23/.dnx/runtimes/dnx-mono.1.0.0-beta4/bin:/usr/local/protobuf/bin:/usr/local/Cellar/scala/2.12.4/bin:/usr/local/bin/vmware/Library:/Users/llv23/Documents/orlando_innovation/homekits_sol/mongodb/bin:/Library/Frameworks/GDAL.framework/Programs:/Users/llv23/Documents/02_apple_programming/06_classdump:/Applications/VirtualBox.app/Contents:/Users/llv23/Documents/04_linuxc/07_redis/redis-2.6.13/src:/Users/llv23/npm-global/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/llv23/.rvm/bin
NPM_CONFIG_PREFIX=/Users/llv23/npm-global/
CONDA_PREFIX=/Users/llv23/opt/miniconda3
PWD=/Users/llv23
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
MXNET_GLUON_REPO=https://apache-mxnet.s3.cn-north-1.amazonaws.com.cn/
LANG=en_US.UTF-8
LUA_CPATH=/Users/llv23/Documents/04_linuxc/07_redis/01_lua/scripts/uuid/uuid.so
_system_arch=x86_64
GRE340=/Users/llv23/Library/Mobile Documents/com~apple~CloudDocs/grefilter
XPC_FLAGS=0x0
SWIFT_HOME=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
_system_version=10.13
_CE_M=
XPC_SERVICE_NAME=0
FLINK_HOME=/usr/local/Cellar/apache-flink/1.3.2/libexec
DOTNET_HOME=/usr/local/share/dotnet
rvm_version=1.29.3 (latest)
OPENSSL_ROOT_DIR=/usr/local/opt/openssl
SHLVL=1
HOME=/Users/llv23
OPENMPI_HOME=/usr/local/opt/open-mpi
DYLD_LIBRARY_PATH=/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-10.1/lib:/usr/local/nccl/lib:/usr/local/cuda/extras/CUPTI/lib:/usr/local/opt/boost-python3/lib:/usr/local/opt/open-mpi/lib
CONDA_PYTHON_EXE=/Users/llv23/opt/miniconda3/bin/python
PYTHONPATH=/Users/llv23/Documents/05_machine_learning/dl_gpu_mac/caffe/python:
LOGNAME=llv23
GEM_PATH=/Users/llv23/.rvm/gems/ruby-2.2.1:/Users/llv23/.rvm/gems/ruby-2.2.1@global
LC_CTYPE=UTF-8
CONDA_DEFAULT_ENV=base
SCALA_HOME=/usr/local/opt/scala
VMWARE_HOME=/usr/local/bin/vmware
DISPLAY=/private/tmp/com.apple.launchd.bcvccljMRS/org.macosforge.xquartz:0
RUBY_VERSION=ruby-2.2.1
NODE_HOME=/usr/local/opt/node@6
_system_name=OSX
M3_HOME=/usr/local/Cellar/maven/3.3.9
NPM_HOME=/Users/llv23/npm-global/
_=/usr/bin/env
我比较了和你的env差别,怀疑是不是cuda的include缺失;我加了试验一下,让机器跑个晚上,看明天是不是还有这个错
# perhaps missing header
export SYS_C_INCLUDE="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"
export C_INCLUDE_PATH=/usr/local/include:/usr/local/cuda/include:${SYS_C_INCLUDE}
export CXX_INCLUDE_PATH=/usr/local/include:/usr/local/cuda/include:${SYS_C_INCLUDE}
刚刚find了一下,结果发现确实在/usr/local/cuda/include/cusparse.h里面,soft link到/Developer/NVIDIA/CUDA-10.1/include/cusparse.h ,希望明早起来这个错误消失吧,编译一次时间巨长
还是没有找到,感觉在include bazel-out/host/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual/third_party/gpus/cuda/include/cusparse.h的时候,有问题
大兄弟,我发现我的CUDA10.1好像不是update2,NVIDA应该是在10.1update2之后才加入的cusparseSpVecDescr_t。。。哎,hopefully sail through
Can you please build your tensorflows with bazel option '--copt=-march=westmere'? I can't build and I can't execute your tensorflows for my Mac Pro 5,1.
In compile process, I got this error many times
ERROR: undeclared inclusion(s) in rule '//tensorflow/core/kernels:nccl_kernels':
this rule is missing dependency declarations for the following files included by 'tensorflow/core/kernels/nccl_ops.cc':
'third_party/nccl/nccl.h'
tensorflow/core/kernels/nccl_ops.cc:189:15: warning: private field 'reduction_op_' is not used [-Wunused-private-field]
ncclRedOp_t reduction_op_;
^
1 warning generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
When I install your tensorflow version, got 'Illegal instruction: 4' when importing tensorflow
I did ‘git checkout r1.12’ and use python 3.6 (in anaconda)
Sorry for the inconvenience
Hi,
This isn't an issue, just a question on how you managed to get lc_version_min_macosx into the Mach-O. I've tried setting these options below, and even "export MACOSX_DEPLOYMENT_TARGET=10.12"
build --action_env PYTHON_BIN_PATH="/Users/myusername/.pyenv/versions/3.7.5/bin/python"
build --action_env PYTHON_LIB_PATH="/Users/myusername/.pyenv/versions/3.7.5/lib/python3.7/site-packages"
build --python_path="/Users/myusername/.pyenv/versions/3.7.5/bin/python"
build:xla --define with_xla_support=true
build --copt=-march=native
build --copt=-Wno-sign-compare
build --copt=-mmacosx-version-min=10.12
build --linkopt="-mmacosx-version-min=10.12"
build --host_copt=-march=native
build --host_copt=-mmacosx-version-min=10.12
build:opt --define with_default_optimizations=true
build:v2 --define=tf_api_version=2
test --flaky_test_attempts=3
test --test_size_filters=small,medium
test --test_tag_filters=-benchmark-test,-no_oss,-oss_serial
test --build_tag_filters=-benchmark-test,-no_oss
test --test_tag_filters=-gpu,-nomac,-no_mac
test --build_tag_filters=-gpu,-nomac,-no_mac
build --action_env TF_CONFIGURE_IOS="0"
build --action_env MACOSX_DEPLOYMENT_TARGET=10.12
Could it be because using CUDA forces it to be signed differently? I'm trying to build a CPU only version with those Mach-O headers and your build is the only one I've found to contain it. Any help would be greatly appreciated. Thank you
Frist, many thanks for the work. It's like a God's gift to me as my Mac**sh has the same config as you, so I have to find another way to get CUDA support on newer TF.
But I've a slightly older CPU then yours which doesn't support AVX. Therefore I have to recompile it from the source (both your 2.2 & 2.3 source packages downloaded from your TensorFlow folk).
After some initial hiccups, I managed to fix other issues, but the crosstool_wrapper_driver_is_not_gcc
error I still haven't got a clue how to fix. 🤨 It happens at a random build stage every time. Just wondering if you've experienced it and any tips you can share for solving it? 🙂
Here is my environment:
Python 3.7
MacOS 10.13.6
CUDA 10.1
cuDNN 7.5.6
tried both clang and gcc from xcode 10.1 (1000.11.45.5)
I followed the steps in build_instructions_1.10, and the following compile error(exactly Symbol not found: _ncclAllReduce
) occurred.
Python 3.7 and tensorflow 1.13.1.
How can I solve this problem?
Execution platform: @bazel_tools//platforms:host_platform
Traceback (most recent call last):
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/Users/ormak/anaconda3/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/Users/ormak/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dlopen(/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _ncclAllReduce
Referenced from: /private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so
Expected in: flat namespace
in /private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
from tensorflow.python.tools.api.generator import doc_srcs
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/Users/ormak/anaconda3/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/Users/ormak/anaconda3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dlopen(/private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _ncclAllReduce
Referenced from: /private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so
Expected in: flat namespace
in /private/var/tmp/_bazel_ormak/b1b58fea2a85dc5b7cee7637f479189d/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 16.382s, Critical Path: 13.67s
INFO: 2 processes: 2 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Thanks for the tutorial.
I just compiled Tensorflow 2.0 for Python 3.6 with compute capability - 6.1
https://github.com/alessandro893/tensorflow-osx-build/releases
Got following error:
tensorflow-1.4.0-cp27-cp27m-macosx_10_12_intel.whl is not a supported wheel on this platform.
OS: 10.12.6
pip: 9.0.1
CUDA: 8.0.83
cuDNN: 6.0
Python on Anaconda: 3.6
I got following error when importing tensorflow :
`
import tensorflow as tf
Traceback (most recent call last):
File "/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/Users/abc/Sites/tfgpu/lib/python3.6/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/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: dlopen(/Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Library not loaded: /usr/local/lib/libgomp.1.dylib
Referenced from: /Users/abc/Sites/tfgpu/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
Reason: image not found
During handling of the above exception, another exception occurred:
`
Any idea? I am using this release : https://github.com/TomHeaven/tensorflow-osx-build/releases/download/v1.12.0_cu100/tensorflow-1.12.0-cp36-cp36m-macosx_10_12_x86_64.whl
My env is:
Python 3.7
CUDA 10.1 with cuDNN 7.5
Since Tensorflow 1.13.1 support python 3.7, @TomHeaven could you please release a tensorflow-1.13.1-py27-py36-py37-cuda10.1-cudnn75?
Got error when building tensorflow on my machine following:
(base) ➜ tensorflow git:(6612da8951) bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
INFO: Invocation ID: e2e443d2-5393-4644-a4d6-42c8a9d28193
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': in /Users/yangliu/Documents/workspace/tensorflow/tensorflow/tensorflow.bzl: Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 1556
_create_local_cuda_repository(repository_ctx)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 1302, in _create_local_cuda_repository
_find_libs(repository_ctx, cuda_config)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 840, in _find_libs
_find_cuda_lib("cublas", repository_ctx, cpu_value, c..., ...)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 752, in _find_cuda_lib
auto_configure_fail(("Cannot find cuda library %s" %...))
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 342, in auto_configure_fail
fail(("\n%sCuda Configuration Error:%...)))
Cuda Configuration Error: Cannot find cuda library libcublas.10.1.dylib
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/tools/pip_package': in /Users/yangliu/Documents/workspace/tensorflow/tensorflow/tensorflow.bzl: Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 1556
_create_local_cuda_repository(repository_ctx)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 1302, in _create_local_cuda_repository
_find_libs(repository_ctx, cuda_config)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 840, in _find_libs
_find_cuda_lib("cublas", repository_ctx, cpu_value, c..., ...)
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 752, in _find_cuda_lib
auto_configure_fail(("Cannot find cuda library %s" %...))
File "/Users/yangliu/Documents/workspace/tensorflow/third_party/gpus/cuda_configure.bzl", line 342, in auto_configure_fail
fail(("\n%sCuda Configuration Error:%...)))
Cuda Configuration Error: Cannot find cuda library libcublas.10.1.dylib
INFO: Elapsed time: 0.278s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: tensorflow/tools/pip_package
Fetching @local_config_cuda; fetching
I disable the sip to make LD_LIBRARY_PATH work.
some export in my .zshrc file:
export CUDA_HOME=/usr/local/cuda
export DYLD_LIBRARY_PATH="$CUDA_HOME/lib:$CUDA_HOME/nvvm/lib:$CUDA_HOME/extras/CUPTI/lib:/usr/local/nccl/lib"
export LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
export PATH=$CUDA_HOME/bin:$PATH
Only libcublas.10.dylib exist under /Developer/NVIDIA/CUDA-10.1/lib. After I make a link file libcublas.10.1.dylib to libcublas.10.dylib, got the same error "Cannot find cuda library libcublas.10.1.dylib"
Hey Tom
Thank you for your effort.
And I am using the tf2.0 and torch successfully.
But TF2.0 has some bugs that cannot autocomplete by IDE like import tensorflow.keras as K
Would You Please Tell Me How to build or install tensorflow-2.0.0-beta1 version on my computer?
thanks a lot.
Have you had success compiling TF 1.10 against CUDA 9.2? Does it compile cleanly from source or are there patches that need to be developed?
Hello Tom,
Nice work on that builds. But I'd like to make personal builds. I've tried following those instructions: https://gist.github.com/Willian-Zhang/088e017774536880bd425178b46b8c17, so using the provided patch on this page (https://gist.github.com/Willian-Zhang/088e017774536880bd425178b46b8c17#file-xtensorflow17macos-patch).
The build goes well, as well as the installation of the resulting whl, but when I start to compute something with Tensorflow, I get a segfault.
I also tried without applying the patch at all, but then it doesn't build.
I'm curious of what patches you applied to the original sources to get it working fully?
Thank you.
Regards
Hi
I was wondering if you've had the chance to try building v1.14-rc0. I've been trying to build it with Bazel 0.24, but I keep running into the error:
external/local_config_cuda/cuda/BUILD:168:1: Executing genrule @local_config_cuda//cuda:cuda-include failed (Exit 1): bash failed: error executing command
...
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp -rLf "/usr/local/cuda/include/." "bazel-out/host/bin/external/local_config_cuda/cuda/cuda/include/" ')
Execution platform: @bazel_tools//platforms:host_platform
cp: the -H, -L, and -P options may not be specified with the -r option.
I could proceed by replacing cp -r
with cp -R
in the generated BUILD
file, but then this error later gets in the way:
ERROR: /Volumes/Data/Projects/tensorflow-1.14/src/tensorflow/tensorflow/core/kernels/BUILD:1766:1: output 'tensorflow/core/kernels/_objs/gather_functor_gpu/gather_functor_gpu.cu.pic.o' was not created
Not sure if you have better luck?
Cheers
Hi,
I tried using this build tensorflow-1.12.0-cp36-cp36m-macosx_10_12_x86_64.whl and use python 3.6.5_1 on Mac OS 10.13.6, it failed to import with :
(tfgpu) MacBook-Pro:tfgpu hud$ python
Python 3.6.5 (default, Jun 17 2018, 12:13:06)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Illegal instruction: 4
Any idea?
Hi
I'm trying to follow the build instructions on the master branch, but I'm trying to build tensorflow r1.13 on CUDA 10.0, OSX 10.13.6, Xcode 10.0/9.4/8.2, Python 3.7.3, Bazel 0.19.0. Based on the advice here, I'm using the command bazel build --config=opt --config=nonccl //tensorflow/tools/pip_package:build_pip_package
. However, I keep getting the error:
apple_cc_toolchain rule @local_config_cc//:cc-compiler-armeabi-v7a: Error while selecting cc_toolchain: No toolchain found for cpu 'darwin'. Valid cpus from default_toolchain entries are: [
]. Valid toolchains are: [
local_linux: --cpu='local' --compiler='compiler',
local_darwin: --cpu='darwin' --compiler='compiler',
local_windows: --cpu='x64_windows' --compiler='msvc-cl',
]
Does anyone know how to fix this? I see that you have successfully built TF 1.13.1, so I'm trying to do the same for r1.13.
Any help appreciated.
UPDATE: I've just tried building 1.13.1, but I'm getting the same error.
不论是跑tensorflow benchmark 还是任何要调用gpu的网络 都会报这个错误
没找到解决办法
pciBusID: 0000:01:00.0 name: GeForce GTX 1050 Ti computeCapability: 6.1
coreClock: 1.493GHz coreCount: 6 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s
2020-05-22 17:13:55.493405: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.10.0.dylib
2020-05-22 17:13:55.493584: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.10.0.dylib
2020-05-22 17:13:55.493753: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.10.0.dylib
2020-05-22 17:13:55.493922: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.10.0.dylib
2020-05-22 17:13:55.494088: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.10.0.dylib
2020-05-22 17:13:55.494255: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.10.0.dylib
2020-05-22 17:13:55.494421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.7.dylib
2020-05-22 17:13:55.494557: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero
2020-05-22 17:13:55.494804: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero
2020-05-22 17:13:55.494920: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2020-05-22 17:13:57.428660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-22 17:13:57.428684: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] 0
2020-05-22 17:13:57.428688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0: N
2020-05-22 17:13:57.429476: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero
2020-05-22 17:13:57.429794: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero
2020-05-22 17:13:57.430043: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero
2020-05-22 17:13:57.430631: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1784 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
2020-05-22 17:13:57.442090: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f91ad5345a0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-05-22 17:13:57.442120: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1050 Ti, Compute Capability 6.1
2020-05-22 17:13:57.481004: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f91ad58c820 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-22 17:13:57.481025: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Fatal Python error: Illegal instruction
10.13.6 1050ti+i7 4771
Hi Tom,
Thanks for your effort putting these wheels together!
I managed to install and run the 2.0.0b0 release fine that was put up earlier this morning but run into a fault with the 2.0.0 wheel you uploaded as below.
>>> import tensorflow as tf
[1] 43217 illegal hardware instruction python
I will try and compile for myself with your updated instructions, but I was wondering if there was a change in compile flags (maybe cpu optimisations) between these releases to track down what is causing this?
I was also wondering if you were planning to look to compile OSX wheels for any of the other Tensorflow packages which are now available such as Tensorflow Addons (https://github.com/tensorflow/addons) ?
Thanks,
Dan
System
10.13.6
2.7 GHz 12-Core Intel Xeon E5
CUDA 10.0
cuDNN 7.4
可以编译支持CUDA10.1的tensonflow2.2.0吗?因为需要升级到了xcode10.1,然后就歇菜了。。。
您提供的编译的包安装可以完美运行,非常感谢博主的工作!然而,再利用tensorflow进行C++开发时,并没有dylib文件,楼主是否可以release出来 或者给一个编译教学呢
@TomHeaven I can't find any patch for tensorflow 2.3.0, but there was indeed built tensorflow 2.3.0 in your release tag. Could you help me understand how I can manage to build tensorflow 2.3.0 on mac 10.13.6 cracked machine? Thanks a lot in advance
我碰到好几个问题
第一个是检测cuda dylib出错,明明有却出现 soname error 通过修改bzl 文件可以过。。
第二个是absl 编译时出错,好像是模板用了什么关键字导致错误。难道你用了旧版的替换了吗?
Hi Tom,
又来*扰你了,我印象中是1.3之后就无法使用XLA了,一旦使用就出现报错,无法找到设备。现在tf2.2默认开启了XLA的编译选项。我跑TF官方的benchmark会报错,因为TF在macOS下的GPU支持已经被放弃了,只能来*扰你了,看下你有没有碰过这种情况。
具体如下:
https://github.com/tensorflow/benchmarks 下载 benchmarks-cnn_tf_v2.1_compatible
python tf_cnn_benchmarks.py --num_gpus=1 --batch_size=64 --model=resnet50 --variable_update=parameter_server --xla_compile=True
2020-05-30 15:31:34.302936: W tensorflow/core/framework/op_kernel.cc:1753] OP_REQUIRES failed at xla_ops.cc:368 : Not found: could not find registered platform with id: 0x141f70298 This error might be occurring with the use of xla.compile. If it is not necessary that every Op be compiled with XLA, an alternative is to use auto_jit with OptimizerOptions.global_jit_level = ON_2 or the environment variable TF_XLA_FLAGS="tf_xla_auto_jit=2" which will attempt to use xla to compile as much of the graph as the compiler is able to. INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.NotFoundError'>, 2 root error(s) found. (0) Not found: could not find registered platform with id: 0x141f70298 This error might be occurring with the use of xla.compile. If it is not necessary that every Op be compiled with XLA, an alternative is to use auto_jit with OptimizerOptions.global_jit_level = ON_2 or the environment variable TF_XLA_FLAGS="tf_xla_auto_jit=2" which will attempt to use xla to compile as much of the graph as the compiler is able to. [[{{node tower_0/v/cluster}}]] [[main_fetch_group/_566]] (1) Not found: could not find registered platform with id: 0x141f70298 This error might be occurring with the use of xla.compile. If it is not necessary that every Op be compiled with XLA, an alternative is to use auto_jit with OptimizerOptions.global_jit_level = ON_2 or the environment variable TF_XLA_FLAGS="tf_xla_auto_jit=2" which will attempt to use xla to compile as much of the graph as the compiler is able to. [[{{node tower_0/v/cluster}}]] 0 successful operations. 0 derived errors ignored.
去掉 --xla_compile=True 这个参数是可以跑的起来的。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.