Skip to content

Commit a0a6949

Browse files
Merge pull request #41 from Archana-Shinde1/add-filter
Added filter
2 parents f09eee0 + 0374d63 commit a0a6949

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

buildscripts/set_tf_io_bazelrc.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,19 @@ build --action_env TF_HEADER_DIR="$PREFIX/lib/python${PY_VER}/site-packages/tens
6565
build --action_env TF_SHARED_LIBRARY_DIR="$PREFIX/lib/python${PY_VER}/site-packages/tensorflow"
6666
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
6767
build --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
7073
build --action_env CPATH="$PREFIX/include/tirpc"
7174
build --action_env LIBRARY_PATH="$PREFIX/lib"
7275
build --linkopt="-L$PREFIX/lib"
7376
build --linkopt="-ltirpc"
77+
EOF
78+
fi
7479

80+
cat >> $BAZEL_RC_DIR/tf_io.bazelrc << EOF
7581
build --experimental_repo_remote_exec
7682
build --enable_platform_specific_config
7783
build:optimization --compilation_mode=opt

recipe/build-tf-io.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@
1717
set -vex
1818

1919
source open-ce-common-utils.sh
20+
ARCH=$(uname -p)
2021

2122
export 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
2731
SCRIPT_DIR=$RECIPE_DIR/../buildscripts

recipe/meta.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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 }}

0 commit comments

Comments
 (0)