TensorFlow 2.4.1 No AVX, No GPU, Python 3.6, 3.7, 3.8, Ubuntu 18.04, multiple Archs
Novaal opened this issue · 5 comments
Built on Ubuntu 18.04. Builds are not tested and provided as is.
Example configuration for Python 3.6 and westmere
:
PYTHON_VERSION=python3.6
PYTHON_BIN_PATH=$(which $PYTHON_VERSION) \
PYTHON_LIB_PATH=$($PYTHON_VERSION -c "import pip; print(pip.__path__[0].rstrip('/pip'))") \
TF_NEED_CUDA=0 \
TF_NEED_ROCM=0 \
TF_DOWNLOAD_CLANG=0 \
CC_OPT_FLAGS="-march=westmere -Wno-sign-compare" \
TF_SET_ANDROID_WORKSPACE=0 \
TF_ENABLE_XLA=1 \
TF_NEED_OPENCL_SYCL=0 \
TF_NEED_MPI=0 \
./configure
This produces the following .tf_configure.bazelrc
for Python 3.6.
build --action_env PYTHON_BIN_PATH="/usr/bin/python3.6"
build --action_env PYTHON_LIB_PATH="/usr/local/lib/python3.6/dist-packages"
build --python_path="/usr/bin/python3.7"
build:xla --define with_xla_support=true
build --config=xla
build:opt --copt=-march=westmere
build:opt --copt=-Wno-sign-compare
build:opt --host_copt=-march=native
build:opt --define with_default_optimizations=true
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
test --build_tag_filters=-gpu
build --action_env TF_CONFIGURE_IOS="0"
GCC Compiler Option (-march) |
Python 3.6 | Python 3.7 | Python 3.8 | All Builds |
---|---|---|---|---|
barcelona | Download | Download | Download | Link |
btver1 | Download | Download | Download | Link |
nehalem | Download | Download | Download | Link |
westmere | Download | Download | Download | Link |
Install with:
pip install --ignore-installed --upgrade tensorflow-2.4.1-cp36-cp36m-linux_x86_64.whl
Please let me know here if it works for you.
works perfect
proc: model name : Intel(R) Core(TM) i3 CPU M 350 @ 2.27GHz
(westmere)
under docker image : python:3.8-slim-buster
Python 3.8.6 (default, Nov 25 2020, 02:47:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.__version__)
2.4.1
platform for testing this .. if someone interest
TF works, but when I install tensorflow-text==2.4.1 and try to use it, I get error when importing: tensorflow.python.framework.errors_impl.NotFoundError: /usr/local/lib/python3.6/dist-packages/tensorflow_text/python/metrics/_text_similarity_metric_ops.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringERKNS_15OpKernelContextEb.
Do you have maybe whl for tensorflow-text from your build, because that is what is recommended solution.
Thank, you!
Hi @dbosnar ,
i didn't build any custom wheels for tensorflow-text yet. Currently i'm focusing on building tensorflow 2.5.0.
This will take same time. After tensorflow 2.5.0 i will take a look into tensorflow-text, but i cannot make any promises now. So if you need it, it would be best you would build it for yourself.