2020-04-27 20:22:55 +02:00
|
|
|
TF_VERSION=1.15.2
|
2019-06-25 23:08:53 +02:00
|
|
|
|
2019-06-27 11:25:14 +02:00
|
|
|
# -march see https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/i386-and-x86-64-Options.html
|
2019-06-27 03:22:09 +02:00
|
|
|
|
|
|
|
all: libtensorflow libtensorflow-avx libtensorflow-avx2
|
2019-06-25 23:08:53 +02:00
|
|
|
patch:
|
|
|
|
git apply tensorflow-$(TF_VERSION).diff
|
2020-04-28 11:51:42 +02:00
|
|
|
download:
|
|
|
|
wget https://github.com/tensorflow/tensorflow/archive/v$(TF_VERSION).tar.gz
|
|
|
|
tar -xzf v$(TF_VERSION).tar.gz
|
|
|
|
cp .tf_configure.bazelrc Makefile *.sh tensorflow-$(TF_VERSION)
|
2019-06-25 23:08:53 +02:00
|
|
|
libtensorflow:
|
2019-06-27 11:25:14 +02:00
|
|
|
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so
|
|
|
|
./create_archive.sh linux-cpu $(TF_VERSION)
|
2019-06-27 03:22:09 +02:00
|
|
|
libtensorflow-avx:
|
|
|
|
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so --copt=-march=core-avx-i --host_copt=-march=core-avx-i
|
|
|
|
./create_archive.sh linux-avx $(TF_VERSION)
|
|
|
|
libtensorflow-avx2:
|
|
|
|
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so --copt=-march=core-avx2 --host_copt=-march=core-avx2
|
|
|
|
./create_archive.sh linux-avx2 $(TF_VERSION)
|