Skip to content

Commit d48f91d

Browse files
committed
Fix: For mac non-docker GPU builds fix handling of test concurrency. (tensorflow#5218)
1 parent 372fcb1 commit d48f91d

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

tensorflow/tools/ci_build/builds/test_installation.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@
4747
# TF_BUILD_BAZEL_CLEAN, if set to any non-empty and non-0 value, directs the
4848
# script to perform bazel clean prior to main build and test steps.
4949
#
50-
# TF_BUILD_USE_GPU, if set to 1, limits the number of concurrent tests to
51-
# the number stored in TF_GPU_COUNT and assigns each test to a different GPU.
52-
#
5350
# TF_GPU_COUNT, Set the number of GPUs in the system. We run only this many
5451
# concurrent tests when running GPU tests.
5552
#
@@ -410,7 +407,7 @@ SKIP_COUNTER=0
410407
FAILED_TESTS=""
411408
FAILED_TEST_LOGS=""
412409

413-
if [[ "${TF_BUILD_USE_GPU}" == "1" ]]; then
410+
if [[ "${IS_GPU}" == "1" ]]; then
414411
N_JOBS=$TF_GPU_COUNT
415412
else
416413
N_JOBS=$(grep -c ^processor /proc/cpuinfo)
@@ -484,7 +481,7 @@ while true; do
484481
TEST_LOGS="${TEST_LOGS} ${TEST_LOG}"
485482

486483
# Launch test asynchronously
487-
if [[ "${TF_BUILD_USE_GPU}" == "1" ]]; then
484+
if [[ "${IS_GPU}" == "1" ]]; then
488485
"${SCRIPT_DIR}/../gpu_build/parallel_gpu_execute.sh" \
489486
"${SCRIPT_DIR}/py_test_delegate.sh" \
490487
"${PYTHON_BIN_PATH}" "${PY_TEST_DIR}/${TEST_BASENAME}" "${TEST_LOG}" &

tensorflow/tools/ci_build/ci_build.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ WORKSPACE="${WORKSPACE:-$(upsearch WORKSPACE)}"
103103
BUILD_TAG="${BUILD_TAG:-tf_ci}"
104104

105105
# Add extra params for cuda devices and libraries for GPU container.
106-
if [ "${CONTAINER_TYPE}" == "gpu" ]; then
107-
# GPU pip tests-on-install concurrency is limited to the number of GPUs.
108-
GPU_EXTRA_PARAMS="${GPU_EXTRA_PARAMS} -e TF_BUILD_USE_GPU=1"
109-
else
106+
# And clear them if we are not building for GPU.
107+
if [ "${CONTAINER_TYPE}" != "gpu" ]; then
110108
GPU_EXTRA_PARAMS=""
111109
fi
112110

0 commit comments

Comments
 (0)