Skip to content

Commit

Permalink
Fix mozilla#3292: Linux debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Lissy committed Sep 30, 2020
1 parent f20f939 commit c8bd91b
Show file tree
Hide file tree
Showing 17 changed files with 277 additions and 25 deletions.
42 changes: 42 additions & 0 deletions taskcluster/.shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ kenlm:
tensorflow:
packages_xenial:
apt: 'apt-get -qq update && apt-get -qq -y install realpath build-essential python-virtualenv python-dev python-pip libblas-dev liblapack-dev gfortran wget software-properties-common pixz zip zlib1g-dev unzip'
packages_bionic:
apt: 'apt-get -qq update && apt-get -qq -y install coreutils build-essential python3-virtualenv python3-dev python3-pip python-is-python3 libblas-dev liblapack-dev gfortran wget software-properties-common pixz zip zlib1g-dev unzip'
packages_win:
pacman: 'pacman --noconfirm -S patch unzip tar'
msys64: 'ln -s $USERPROFILE/msys64 $TASKCLUSTER_TASK_DIR/msys64'
java:
packages_xenial:
apt: 'apt-get -qq -y install curl software-properties-common wget unzip && add-apt-repository --yes ppa:openjdk-r/ppa && apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --force-yes install openjdk-8-jdk && java -version && update-ca-certificates -f'
packages_bionic:
apt: 'apt-get -qq -y install curl software-properties-common wget unzip && add-apt-repository --yes ppa:openjdk-r/ppa && apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --force-yes install openjdk-8-jdk && java -version && update-ca-certificates -f'
electronjs:
packages_xenial:
apt: 'libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 xvfb'
Expand Down Expand Up @@ -204,6 +208,44 @@ system:
ios_x86_64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_x86_64/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_x86_64"
tensorflow_gcc9:
linux_amd64_cpu:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cpu_gcc9/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cpu_gcc9"
tensorflow_dbg:
linux_amd64_cpu:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cpu/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cpu"
linux_amd64_cuda:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cuda/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.cuda"
linux_armv7:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.arm/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.arm"
linux_arm64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.arm64/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.arm64"
darwin_amd64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.osx/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.osx"
android_arm64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.android-arm64/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.android-arm64"
android_armv7:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.android-armv7/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.android-armv7"
win_amd64_cpu:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.win/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.win"
win_amd64_cuda:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.win-cuda/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.win-cuda"
ios_arm64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_arm64/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_arm64"
ios_x86_64:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_x86_64/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow_dbg.pip.r2.3.23ad988fcde60fb01f9533e95004bbc4877a9143.0.ios_x86_64"
username: 'build-user'
homedir:
linux: '/home/build-user'
Expand Down
3 changes: 3 additions & 0 deletions taskcluster/generic_tc_caching-linux-opt-base.tyml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ payload:
features:
taskclusterProxy: true

env:
DEBIAN_FRONTEND: "noninteractive"

command:
- "/bin/bash"
- "--login"
Expand Down
27 changes: 27 additions & 0 deletions taskcluster/host-build-dbg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -xe

runtime=$1

source $(dirname "$0")/tc-tests-utils.sh

source $(dirname "$0")/tf_tc-vars.sh

BAZEL_TARGETS="
//native_client:libdeepspeech.so
"

if [ "${runtime}" = "tflite" ]; then
BAZEL_BUILD_TFLITE="--define=runtime=tflite"
fi;

BAZEL_BUILD_FLAGS="${BAZEL_BUILD_TFLITE} ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS}"

BAZEL_ENV_FLAGS="TF_NEED_CUDA=0"
SYSTEM_TARGET=host

do_bazel_build "dbg"

export EXTRA_LOCAL_CFLAGS="-ggdb"
do_deepspeech_binary_build
1 change: 0 additions & 1 deletion taskcluster/host-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ else
fi

do_deepspeech_nodejs_build

22 changes: 22 additions & 0 deletions taskcluster/linux-amd64-cpu-dbg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
build:
template_file: linux-opt-base.tyml
dependencies:
- "swig-linux-amd64"
- "node-gyp-cache"
- "pyenv-linux-amd64"
- "tf_linux-amd64-cpu_gcc9"
routes:
- "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.cpu-dbg"
- "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.cpu-dbg"
- "index.project.deepspeech.deepspeech.native_client.cpu-dbg.${event.head.sha}"
tensorflow: ${system.tensorflow_gcc9.linux_amd64_cpu.url}
docker_image: "ubuntu:20.04"
scripts:
setup: "taskcluster/tc-true.sh"
build: "taskcluster/host-build-dbg.sh"
package: "taskcluster/package.sh"
nc_asset_name: "native_client.amd64.cpu.linux.tar.xz"
workerType: "${docker.tfBuild}"
metadata:
name: "DeepSpeech Linux AMD64 CPU Debug"
description: "Building DeepSpeech for Linux/AMD64, CPU only, debug version"
22 changes: 22 additions & 0 deletions taskcluster/linux-amd64-tflite-dbg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
build:
template_file: linux-opt-base.tyml
dependencies:
- "swig-linux-amd64"
- "node-gyp-cache"
- "pyenv-linux-amd64"
- "tf_linux-amd64-cpu_gcc9"
routes:
- "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.tflite-dbg"
- "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.tflite-dbg"
- "index.project.deepspeech.deepspeech.native_client.tflite-dbg.${event.head.sha}"
tensorflow: ${system.tensorflow_gcc9.linux_amd64_cpu.url}
docker_image: "ubuntu:20.04"
scripts:
setup: "taskcluster/tc-true.sh"
build: "taskcluster/host-build-dbg.sh tflite"
package: "taskcluster/package.sh"
nc_asset_name: "native_client.amd64.tflite.linux.tar.xz"
workerType: "${docker.tfBuild}"
metadata:
name: "DeepSpeech Linux AMD64 TFLite debug"
description: "Building DeepSpeech for Linux/AMD64, TFLite, debug version"
5 changes: 3 additions & 2 deletions taskcluster/linux-opt-base.tyml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ then:

payload:
maxRunTime: { $eval: to_int(build.maxRunTime) }
image: "ubuntu:16.04"
image: ${build.docker_image}

env:
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
DEBIAN_FRONTEND: "noninteractive"

command:
- "/bin/bash"
Expand All @@ -44,7 +45,7 @@ then:
extraSystemConfig: { $eval: strip(str(build.system_config)) }
in: >
adduser --system --home ${system.homedir.linux} ${system.username} &&
apt-get -qq update && apt-get -qq -y install ${deepspeech.packages_xenial.apt} pixz pkg-config realpath sudo unzip wget zip && ${extraSystemSetup} &&
apt-get -qq update && apt-get -qq -y install ${deepspeech.packages_xenial.apt} pixz pkg-config coreutils sudo unzip wget zip && ${extraSystemSetup} &&
cd ${system.homedir.linux}/ &&
echo -e "#!/bin/bash\nset -xe\n env && id && (wget -O - $TENSORFLOW_BUILD_ARTIFACT | pixz -d | tar -C ${system.homedir.linux}/ -xf - ) && cd ~/DeepSpeech/ds && git remote set-url origin ${event.head.repo.url} && git fetch origin && git checkout --quiet ${event.head.sha} && git submodule --quiet sync tensorflow/ && git submodule --quiet update tensorflow/ && mkdir -p ${system.homedir.linux}/.cache/node-gyp/ && wget -O - ${system.node_gyp_cache.url} | tar -C ${system.homedir.linux}/.cache/node-gyp/ -xzf - && mkdir -p ${system.homedir.linux}/pyenv-root/ && wget -O - ${system.pyenv.linux.url} | tar -C ${system.homedir.linux}/pyenv-root/ -xzf - && if [ ! -z "${build.gradle_cache.url}" ]; then wget -O - ${build.gradle_cache.url} | tar -C ${system.homedir.linux}/ -xzf - ; fi && if [ ! -z "${build.android_cache.url}" ]; then wget -O - ${build.android_cache.url} | tar -C ${system.homedir.linux}/ -xzf - ; fi;" > /tmp/clone.sh && chmod +x /tmp/clone.sh &&
sudo -H -u ${system.username} /bin/bash /tmp/clone.sh && ${extraSystemConfig} &&
Expand Down
19 changes: 12 additions & 7 deletions taskcluster/tc-build-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,26 @@ do_deepspeech_npm_package()

do_bazel_build()
{
local _opt_or_dbg=${1:-"opt"}

cd ${DS_TFDIR}
eval "export ${BAZEL_ENV_FLAGS}"

if is_patched_bazel; then
find ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-out/ -iname "*.ckd" | tar -cf ${DS_ROOT_TASK}/DeepSpeech/bazel-ckd-tf.tar -T -
if [ "${_opt_or_dbg}" = "opt" ]; then
if is_patched_bazel; then
find ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-out/ -iname "*.ckd" | tar -cf ${DS_ROOT_TASK}/DeepSpeech/bazel-ckd-tf.tar -T -
fi;
fi;

bazel ${BAZEL_OUTPUT_USER_ROOT} build \
-s --explain bazel_monolithic.log --verbose_explanations --experimental_strict_action_env --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt ${BAZEL_BUILD_FLAGS} ${BAZEL_TARGETS}
-s --explain bazel_monolithic.log --verbose_explanations --experimental_strict_action_env --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c ${_opt_or_dbg} ${BAZEL_BUILD_FLAGS} ${BAZEL_TARGETS}

if is_patched_bazel; then
find ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-out/ -iname "*.ckd" | tar -cf ${DS_ROOT_TASK}/DeepSpeech/bazel-ckd-ds.tar -T -
if [ "${_opt_or_dbg}" = "opt" ]; then
if is_patched_bazel; then
find ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-out/ -iname "*.ckd" | tar -cf ${DS_ROOT_TASK}/DeepSpeech/bazel-ckd-ds.tar -T -
fi;
verify_bazel_rebuild "${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel_monolithic.log"
fi;

verify_bazel_rebuild "${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel_monolithic.log"
}

shutdown_bazel()
Expand Down
17 changes: 17 additions & 0 deletions taskcluster/tf_android-arm64-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.android_arm64.url}
artifact_namespace: ${system.tensorflow_dbg.android_arm64.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh --android-arm64"
build: "taskcluster/tf_tc-build.sh --android-arm64 dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Android ARM64 debug"
description: "Building TensorFlow for Android ARM64, debug version"
17 changes: 17 additions & 0 deletions taskcluster/tf_android-armv7-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.android_armv7.url}
artifact_namespace: ${system.tensorflow_dbg.android_armv7.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh --android-armv7"
build: "taskcluster/tf_tc-build.sh --android-armv7 dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Android ARMv7 debug"
description: "Building TensorFlow for Android ARMv7, debug version"
17 changes: 17 additions & 0 deletions taskcluster/tf_linux-amd64-cpu-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.linux_amd64_cpu.url}
artifact_namespace: ${system.tensorflow_dbg.linux_amd64_cpu.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh"
build: "taskcluster/tf_tc-build.sh --linux-cpu dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Linux AMD64 CPU debug"
description: "Building TensorFlow for Linux/AMD64, CPU only, debug version"
18 changes: 18 additions & 0 deletions taskcluster/tf_linux-amd64-cpu_gcc9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_gcc9.linux_amd64_cpu.url}
artifact_namespace: ${system.tensorflow_gcc9.linux_amd64_cpu.namespace}
docker_image: "ubuntu:20.04"
system_config:
>
${tensorflow.packages_bionic.apt} && ${java.packages_bionic.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh"
build: "taskcluster/tf_tc-build.sh --linux-cpu --py3"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Linux AMD64 CPU opt/gcc9"
description: "Building TensorFlow for Linux/AMD64, CPU only, opt/gcc9"
17 changes: 17 additions & 0 deletions taskcluster/tf_linux-amd64-gpu-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.linux_amd64_cuda.url}
artifact_namespace: ${system.tensorflow_dbg.linux_amd64_cuda.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh --linux-cuda"
build: "taskcluster/tf_tc-build.sh --linux-cuda dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Linux AMD64 CUDA debug"
description: "Building TensorFlow for Linux/AMD64, CUDA-enabled, debug version"
17 changes: 17 additions & 0 deletions taskcluster/tf_linux-arm64-cpu-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.linux_arm64.url}
artifact_namespace: ${system.tensorflow_dbg.linux_arm64.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh"
build: "taskcluster/tf_tc-build.sh --linux-arm64 dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Linux ARM64 Cortex-A53 CPU debug"
description: "Building TensorFlow for Linux ARM64 Cortex-A53, CPU only, debug version"
17 changes: 17 additions & 0 deletions taskcluster/tf_linux-rpi3-cpu-dbg.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
template_file: generic_tc_caching-linux-opt-base.tyml
cache:
artifact_url: ${system.tensorflow_dbg.linux_armv7.url}
artifact_namespace: ${system.tensorflow_dbg.linux_armv7.namespace}
system_config:
>
${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt}
scripts:
setup: "taskcluster/tf_tc-setup.sh"
build: "taskcluster/tf_tc-build.sh --linux-arm dbg"
package: "taskcluster/tf_tc-package.sh"
maxRunTime: 14400
workerType: "${docker.tfBuild}"
metadata:
name: "TensorFlow Linux RPi3/ARMv7 CPU debug"
description: "Building TensorFlow for Linux RPi3 ARMv7, CPU only, debug version"
22 changes: 13 additions & 9 deletions taskcluster/tf_tc-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,36 @@ pushd ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/
# Force toolchain sync (useful on macOS ?)
bazel ${BAZEL_OUTPUT_USER_ROOT} sync --configure

OPT_OR_DBG=${2:-opt}
MAYBE_DEBUG=$2
OPT_OR_DBG="-c opt"
if [ "${MAYBE_DEBUG}" = "dbg" ]; then
OPT_OR_DBG="-c dbg"
fi;

case "$1" in
"--linux-cpu"|"--darwin-cpu"|"--windows-cpu")
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LIB_CPP_API} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LIB_CPP_API} ${BUILD_TARGET_LITE_LIB}
;;
"--linux-cuda"|"--windows-cuda")
eval "export ${TF_CUDA_FLAGS}" && (echo "" | TF_NEED_CUDA=1 ./configure) && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_CUDA_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BAZEL_OPT_FLAGS} ${BUILD_TARGET_LIB_CPP_API}
eval "export ${TF_CUDA_FLAGS}" && (echo "" | TF_NEED_CUDA=1 ./configure) && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_CUDA_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BAZEL_OPT_FLAGS} ${BUILD_TARGET_LIB_CPP_API}
;;
"--linux-arm")
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
"--linux-arm64")
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
"--android-armv7")
echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
"--android-arm64")
echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
"--ios-arm64")
echo "" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_IOS_ARM64_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_IOS_ARM64_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
"--ios-x86_64")
echo "" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_IOS_X86_64_FLAGS} ${BUILD_TARGET_LITE_LIB}
echo "" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_IOS_X86_64_FLAGS} ${BUILD_TARGET_LITE_LIB}
;;
esac

Expand Down
Loading

0 comments on commit c8bd91b

Please sign in to comment.