diff --git a/taskcluster/tf_android-arm64-opt.yml b/taskcluster/tf_android-arm64-opt.yml index e0f2170e..7060b5f9 100644 --- a/taskcluster/tf_android-arm64-opt.yml +++ b/taskcluster/tf_android-arm64-opt.yml @@ -7,7 +7,7 @@ build: > ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: - setup: "taskcluster/tf_tc-setup.sh --android" + setup: "taskcluster/tf_tc-setup.sh --android-arm64" build: "taskcluster/tf_tc-build.sh --android-arm64" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 diff --git a/taskcluster/tf_android-armv7-opt.yml b/taskcluster/tf_android-armv7-opt.yml index 07091d69..44f1ed01 100644 --- a/taskcluster/tf_android-armv7-opt.yml +++ b/taskcluster/tf_android-armv7-opt.yml @@ -7,7 +7,7 @@ build: > ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: - setup: "taskcluster/tf_tc-setup.sh --android" + setup: "taskcluster/tf_tc-setup.sh --android-armv7" build: "taskcluster/tf_tc-build.sh --android-armv7" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 diff --git a/taskcluster/tf_darwin-amd64-opt.yml b/taskcluster/tf_darwin-amd64-opt.yml index 4ab0646b..3faa1502 100644 --- a/taskcluster/tf_darwin-amd64-opt.yml +++ b/taskcluster/tf_darwin-amd64-opt.yml @@ -6,7 +6,7 @@ build: workerType: ${macOS.tfBuild} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --cpu" + build: "taskcluster/tf_tc-build.sh --darwin-cpu" package: "taskcluster/tf_tc-package.sh" maxRunTime: 28800 metadata: diff --git a/taskcluster/tf_linux-amd64-cpu-opt.yml b/taskcluster/tf_linux-amd64-cpu-opt.yml index df4c29b0..9538c52a 100644 --- a/taskcluster/tf_linux-amd64-cpu-opt.yml +++ b/taskcluster/tf_linux-amd64-cpu-opt.yml @@ -8,7 +8,7 @@ build: ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --cpu" + build: "taskcluster/tf_tc-build.sh --linux-cpu" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 workerType: "${docker.tfBuild}" diff --git a/taskcluster/tf_linux-amd64-gpu-opt.yml b/taskcluster/tf_linux-amd64-gpu-opt.yml index 53037435..6092397f 100644 --- a/taskcluster/tf_linux-amd64-gpu-opt.yml +++ b/taskcluster/tf_linux-amd64-gpu-opt.yml @@ -7,8 +7,8 @@ build: > ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: - setup: "taskcluster/tf_tc-setup.sh --cuda" - build: "taskcluster/tf_tc-build.sh --gpu" + setup: "taskcluster/tf_tc-setup.sh --linux-cuda" + build: "taskcluster/tf_tc-build.sh --linux-cuda" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 workerType: "${docker.tfBuild}" diff --git a/taskcluster/tf_linux-arm64-cpu-opt.yml b/taskcluster/tf_linux-arm64-cpu-opt.yml index 11c5a8c0..66b4fbc6 100644 --- a/taskcluster/tf_linux-arm64-cpu-opt.yml +++ b/taskcluster/tf_linux-arm64-cpu-opt.yml @@ -8,7 +8,7 @@ build: ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --arm64" + build: "taskcluster/tf_tc-build.sh --linux-arm64" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 workerType: "${docker.tfBuild}" diff --git a/taskcluster/tf_linux-rpi3-cpu-opt.yml b/taskcluster/tf_linux-rpi3-cpu-opt.yml index 5c39e53a..376d0b6c 100644 --- a/taskcluster/tf_linux-rpi3-cpu-opt.yml +++ b/taskcluster/tf_linux-rpi3-cpu-opt.yml @@ -8,7 +8,7 @@ build: ${tensorflow.packages_xenial.apt} && ${java.packages_xenial.apt} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --arm" + build: "taskcluster/tf_tc-build.sh --linux-arm" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 workerType: "${docker.tfBuild}" diff --git a/taskcluster/tf_tc-build.sh b/taskcluster/tf_tc-build.sh index 6ac03120..93287bd5 100755 --- a/taskcluster/tf_tc-build.sh +++ b/taskcluster/tf_tc-build.sh @@ -14,30 +14,32 @@ 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} + case "$1" in - "--cpu") - echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c opt ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LIB_CPP_API} ${BUILD_TARGET_LITE_LIB} + "--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} ;; - "--gpu") - eval "export ${TF_CUDA_FLAGS}" && (echo "" | TF_NEED_CUDA=1 ./configure) && ${BAZEL_BUILD} -c opt ${BAZEL_CUDA_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BAZEL_OPT_FLAGS} ${BUILD_TARGET_LIB_CPP_API} + "--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} ;; - "--arm") - echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c opt ${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB} + "--linux-arm") + echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c ${OPT_OR_DBG} ${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB} ;; - "--arm64") - echo "" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} -c opt ${BAZEL_ARM64_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} ;; "--android-armv7") - echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} -c opt ${BAZEL_ANDROID_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB} + echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} -c ${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 ${BAZEL_ANDROID_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB} + echo "" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} -c ${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 ${BAZEL_IOS_ARM64_FLAGS} ${BUILD_TARGET_LITE_LIB} + echo "" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} -c ${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 ${BAZEL_IOS_X86_64_FLAGS} ${BUILD_TARGET_LITE_LIB} + 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} ;; esac diff --git a/taskcluster/tf_tc-setup.sh b/taskcluster/tf_tc-setup.sh index 3e5973e0..4af10ac6 100755 --- a/taskcluster/tf_tc-setup.sh +++ b/taskcluster/tf_tc-setup.sh @@ -4,15 +4,17 @@ set -ex source $(dirname $0)/tf_tc-vars.sh -install_cuda= -if [ "$1" = "--cuda" ]; then - install_cuda=yes -fi - install_android= -if [ "$1" = "--android" ]; then +install_cuda= +case "$1" in + "--linux-cuda"|"--windows-cuda") + install_cuda=yes + ;; + + "--android-armv7"|"--android-arm64") install_android=yes -fi + ;; +esac # $1 url # $2 sha256 diff --git a/taskcluster/tf_win-amd64-cpu-opt.yml b/taskcluster/tf_win-amd64-cpu-opt.yml index 99b4d8a3..76652804 100644 --- a/taskcluster/tf_win-amd64-cpu-opt.yml +++ b/taskcluster/tf_win-amd64-cpu-opt.yml @@ -8,7 +8,7 @@ build: ${tensorflow.packages_win.pacman} && ${tensorflow.packages_win.msys64} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --cpu" + build: "taskcluster/tf_tc-build.sh --windows-cpu" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 metadata: diff --git a/taskcluster/tf_win-amd64-gpu-opt.yml b/taskcluster/tf_win-amd64-gpu-opt.yml index 63fa1ac5..c62511a0 100644 --- a/taskcluster/tf_win-amd64-gpu-opt.yml +++ b/taskcluster/tf_win-amd64-gpu-opt.yml @@ -8,7 +8,7 @@ build: ${tensorflow.packages_win.pacman} && ${tensorflow.packages_win.msys64} scripts: setup: "taskcluster/tf_tc-setup.sh" - build: "taskcluster/tf_tc-build.sh --gpu" + build: "taskcluster/tf_tc-build.sh --windows-cuda" package: "taskcluster/tf_tc-package.sh" maxRunTime: 14400 metadata: