Fix Makefile for building TF on Linux #83
This commit is contained in:
parent
852d13797a
commit
7981bf6d82
1 changed files with 7 additions and 5 deletions
|
@ -1,18 +1,20 @@
|
||||||
TF_VERSION=1.14.0
|
TF_VERSION=1.14.0
|
||||||
|
|
||||||
# -march see https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
|
# -march see https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/i386-and-x86-64-Options.html
|
||||||
|
|
||||||
all: libtensorflow libtensorflow-avx libtensorflow-avx2
|
all: libtensorflow libtensorflow-avx libtensorflow-avx2
|
||||||
patch:
|
patch:
|
||||||
git apply tensorflow-$(TF_VERSION).diff
|
git apply tensorflow-$(TF_VERSION).diff
|
||||||
libtensorflow:
|
libtensorflow:
|
||||||
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so --copt=-march=i686 --host_copt=-i686
|
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so
|
||||||
./create_archive.sh linux-i686 $(TF_VERSION)
|
./create_archive.sh linux-cpu $(TF_VERSION)
|
||||||
libtensorflow-avx:
|
libtensorflow-avx:
|
||||||
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so --copt=-march=core-avx-i --host_copt=-march=core-avx-i
|
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)
|
./create_archive.sh linux-avx $(TF_VERSION)
|
||||||
libtensorflow-avx2:
|
libtensorflow-avx2:
|
||||||
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so --copt=-march=core-avx2 --host_copt=-march=core-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)
|
./create_archive.sh linux-avx2 $(TF_VERSION)
|
||||||
static:
|
static-avx:
|
||||||
env JOB_COUNT=2 ARCH=i686 ./build_static.sh
|
env JOB_COUNT=2 ARCH=core-avx-i ./build_static.sh
|
||||||
|
static-avx2:
|
||||||
|
env JOB_COUNT=2 ARCH=core-avx2 ./build_static.sh
|
||||||
|
|
Loading…
Reference in a new issue