File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11"""Implements custom rules for Lingvo."""
22
33def tf_copts ():
4- # TODO(drpng): autoconf this.
5- return ["-std=c++17" , "-Wno-sign-compare" , "-mavx" ] + select ({
4+ # "-Wno-sign-compare", "-mavx" removed for compat with aarch64
5+ return ["-std=c++17" ] + select ({
66 "//lingvo:cuda" : ["-DGOOGLE_CUDA=1" ],
77 "//conditions:default" : [],
88 })
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ function write_action_env_to_bazelrc() {
4444[ -e .bazelrc ] && rm .bazelrc
4545
4646write_to_bazelrc " build -c opt"
47- write_to_bazelrc ' build --copt=-mavx --host_copt=-mavx'
47+ [[ $( uname -m ) == " x86_64 " ]] && write_to_bazelrc ' build --copt=-mavx --host_copt=-mavx'
4848write_to_bazelrc ' build --cxxopt=-std=c++17'
4949write_to_bazelrc ' build --auto_output_filter=subpackages'
5050write_to_bazelrc ' build --copt="-Wall" --copt="-Wno-sign-compare"'
@@ -97,8 +97,10 @@ DST_DIR="/tmp/lingvo/dist"
9797
9898# Note: constraining our release to plat==manylinux2014_x86_64 to match TF.
9999# This corresponds to our use of the devtoolset-9 toolchain.
100- find " $DST_DIR " -name " *cp3${PYTHON_MINOR_VERSION} *.whl" | \
101- xargs -n1 ./third_party/auditwheel.sh repair --plat manylinux2014_x86_64 -w " $DST_DIR "
100+ if [[ $( uname -m) == " x86_64" ]]; then
101+ find " $DST_DIR " -name " *cp3${PYTHON_MINOR_VERSION} *.whl" | \
102+ xargs -n1 ./third_party/auditwheel.sh repair --plat manylinux2014_x86_64 -w " $DST_DIR "
103+ fi
102104
103105rm .bazelrc
104106
You can’t perform that action at this time.
0 commit comments