Skip to content

Commit

Permalink
Merge pull request tensorflow#5227 from gunan/r0.11
Browse files Browse the repository at this point in the history
Fix: For mac non-docker GPU builds fix handling of test concurrency. …
  • Loading branch information
gunan authored Oct 27, 2016
2 parents 372fcb1 + d48f91d commit 5c1ca71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 2 additions & 5 deletions tensorflow/tools/ci_build/builds/test_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
# TF_BUILD_BAZEL_CLEAN, if set to any non-empty and non-0 value, directs the
# script to perform bazel clean prior to main build and test steps.
#
# TF_BUILD_USE_GPU, if set to 1, limits the number of concurrent tests to
# the number stored in TF_GPU_COUNT and assigns each test to a different GPU.
#
# TF_GPU_COUNT, Set the number of GPUs in the system. We run only this many
# concurrent tests when running GPU tests.
#
Expand Down Expand Up @@ -410,7 +407,7 @@ SKIP_COUNTER=0
FAILED_TESTS=""
FAILED_TEST_LOGS=""

if [[ "${TF_BUILD_USE_GPU}" == "1" ]]; then
if [[ "${IS_GPU}" == "1" ]]; then
N_JOBS=$TF_GPU_COUNT
else
N_JOBS=$(grep -c ^processor /proc/cpuinfo)
Expand Down Expand Up @@ -484,7 +481,7 @@ while true; do
TEST_LOGS="${TEST_LOGS} ${TEST_LOG}"

# Launch test asynchronously
if [[ "${TF_BUILD_USE_GPU}" == "1" ]]; then
if [[ "${IS_GPU}" == "1" ]]; then
"${SCRIPT_DIR}/../gpu_build/parallel_gpu_execute.sh" \
"${SCRIPT_DIR}/py_test_delegate.sh" \
"${PYTHON_BIN_PATH}" "${PY_TEST_DIR}/${TEST_BASENAME}" "${TEST_LOG}" &
Expand Down
6 changes: 2 additions & 4 deletions tensorflow/tools/ci_build/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ WORKSPACE="${WORKSPACE:-$(upsearch WORKSPACE)}"
BUILD_TAG="${BUILD_TAG:-tf_ci}"

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

Expand Down

0 comments on commit 5c1ca71

Please sign in to comment.