6e63b2ba122b9ab04e03a60b63bc38a4e26b692f — Johan Vandegriff 8 months ago 38566ec
added build for python 3.8
2 files changed, 18 insertions(+), 3 deletions(-)

A tensorflow-2.4.1-cp38-cp38-linux_x86_64.whl
M README.md => README.md +18 -3
@@ 2,9 2,9 @@
I was getting `Illegal instruction (core dumped)` when running tensorflow 2.4.1 on my computer. I found [this github issue](https://github.com/tensorflow/tensorflow/issues/17411) which said that newer versions of tensorflow require CPUs with the AVX instruction, which mine apparently does not have. The solution suggested in that thread was to build from source, which solved it for me, but took several hours to complete. So I decided to publish the build for anyone who has the same issue and trusts me to not modify the build. If you want better security, build it yourself using the process in [this guide](https://www.tensorflow.org/install/source) or the rest of this document.

# My Build
My build is for version 2.4.1 of tensorflow on python 3.6.9
I built tensorflow 2.4.1 for python 3.6 and 3.8:

Download it here:
## For python 3.6:

And install it with

@@ 12,6 12,15 @@ And install it with
pip3 install tensorflow-2.4.1-cp36-cp36m-linux_x86_64.whl

## For python 3.8:

And install it with
pip3 install tensorflow-2.4.1-cp38-cp38-linux_x86_64.whl

This was built with the flags `-march=native -mcx16` for 64-bit linux on the following CPU:
Architecture:        x86_64

@@ 53,12 62,17 @@ grep flags -m1 /proc/cpuinfo | cut -d ":" -f 2 | tr '[:upper:]' '[:lower:]' | { 

#apt dependencies
apt update
apt install python3-dev python3-pip -y
apt install -y python3-dev python3-pip #python 3.6

#pip dependencies
pip3 install -U --user pip numpy wheel
pip3 install -U --user keras_preprocessing --no-deps

#for python 3.8:
apt install -y python-3.8
python3.8 -m pip install -U --user pip numpy wheel
python3.8 -m pip install -U --user keras_preprocessing --no-deps

#install bazel
wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-linux-x86_64
chmod +x bazel-3.7.2-linux-x86_64

@@ 77,6 91,7 @@ cd tensorflow

git checkout r2.4
#for python 3.8, specify "/usr/bin/python3.8" for the python location
#IMPORTANT!!! enter the compiler flags when prompted "Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: "

#build the actual thing -- takes a while!

A tensorflow-2.4.1-cp38-cp38-linux_x86_64.whl => tensorflow-2.4.1-cp38-cp38-linux_x86_64.whl +0 -0