File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,19 @@ build --action_env TF_HEADER_DIR="$PREFIX/lib/python${PY_VER}/site-packages/tens
6565build --action_env TF_SHARED_LIBRARY_DIR="$PREFIX /lib/python${PY_VER} /site-packages/tensorflow"
6666build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
6767build --cxxopt="-std=c++17"
68+ EOF
6869
69- # libtirpc support
70+ # libtirpc support (x86_64 only)
71+ if [[ " ${ARCH} " == " x86_64" ]]; then
72+ cat >> $BAZEL_RC_DIR /tf_io.bazelrc << EOF
7073build --action_env CPATH="$PREFIX /include/tirpc"
7174build --action_env LIBRARY_PATH="$PREFIX /lib"
7275build --linkopt="-L$PREFIX /lib"
7376build --linkopt="-ltirpc"
77+ EOF
78+ fi
7479
80+ cat >> $BAZEL_RC_DIR /tf_io.bazelrc << EOF
7581build --experimental_repo_remote_exec
7682build --enable_platform_specific_config
7783build:optimization --compilation_mode=opt
Original file line number Diff line number Diff line change 1717set -vex
1818
1919source open-ce-common-utils.sh
20+ ARCH=$( uname -p)
2021
2122export TF_PYTHON_VERSION=$PY_VER
22- export CFLAGS=" -I$PREFIX /include/tirpc $CFLAGS "
23- export CXXFLAGS=" -I$PREFIX /include/tirpc $CXXFLAGS "
24- export LDFLAGS=" -L$PREFIX /lib -ltirpc $LDFLAGS "
23+
24+ if [[ " ${ARCH} " == " x86_64" ]]; then
25+ export CFLAGS=" -I$PREFIX /include/tirpc ${CFLAGS} "
26+ export CXXFLAGS=" -I$PREFIX /include/tirpc ${CXXFLAGS} "
27+ export LDFLAGS=" -L$PREFIX /lib -ltirpc ${LDFLAGS} "
28+ fi
2529
2630# Build Tensorflow from source
2731SCRIPT_DIR=$RECIPE_DIR /../buildscripts
Original file line number Diff line number Diff line change @@ -31,22 +31,21 @@ outputs:
3131 build :
3232 - {{ compiler('c') }} # [ ppc_arch != "p10"]
3333 - {{ compiler('cxx') }} # [ ppc_arch != "p10"]
34- - libtirpc
34+ - libtirpc # [x86_64]
3535 host :
3636 - git >=2.2
3737 - bazel {{ bazel }}
3838 - cudatoolkit {{ cudatoolkit }} # [build_type == 'cuda']
3939 - setuptools {{ setuptools }}
4040 - python {{ python }}
41- - libtirpc
41+ - libtirpc # [x86_64]
4242 - numpy {{ numpy }}
4343 - tensorflow-base {{ tensorflow }}
4444 - _tensorflow_select 1.0 # [build_type == 'cpu']
4545 - _tensorflow_select 2.0 # [build_type == 'cuda']
4646 - keras {{ keras }}
4747 - tensorflow-estimator {{ tensorflow }}
4848 - tensorboard {{ tensorboard }}
49- - libtirpc
5049 run :
5150 - python {{ python }}
5251 - numpy {{ numpy }}
@@ -65,7 +64,7 @@ outputs:
6564 - {{ compiler('c') }} # [ ppc_arch != "p10"]
6665 - {{ compiler('cxx') }} # [ ppc_arch != "p10"]
6766 - bazel {{ bazel }}
68- - libtirpc
67+ - libtirpc # [x86_64]
6968 host :
7069 - git >=2.2
7170 - setuptools {{ setuptools }}
@@ -78,7 +77,7 @@ outputs:
7877 - keras {{ keras }}
7978 - tensorflow-estimator {{ tensorflow }}
8079 - tensorboard {{ tensorboard }}
81- - libtirpc
80+ - libtirpc # [x86_64]
8281 run :
8382 - cudatoolkit {{ cudatoolkit }} # [build_type == 'cuda']
8483 - python {{ python }}
You can’t perform that action at this time.
0 commit comments