Skip to content

Commit

Permalink
[CI] Limit number of threads in all jobs (apache#5815)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and Trevor Morris committed Jun 18, 2020
1 parent b554191 commit 943e82a
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/scripts/task_cpp_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"
# NOTE: important to use abspath, when VTA is enabled.
export VTA_HW_PATH=`pwd`/3rdparty/vta-hw

# to avoid CI thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

# Remove existing testcases
rm -f build/*_test

Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"
tvm_root="$(git rev-parse --show-toplevel)"
export PYTHONPATH="$tvm_root/python":"$tvm_root/topi/python"

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

# Golang tests
make -C golang tests
4 changes: 4 additions & 0 deletions tests/scripts/task_java_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ set -u
export PYTHONPATH=python
export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

CURR_DIR=$(cd `dirname $0`; pwd)
SCRIPT_DIR=$CURR_DIR/../../jvm/core/src/test/scripts
TEMP_DIR=$(mktemp -d)
Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_python_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ set -u

source tests/scripts/setup-pytest-env.sh

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=4

cleanup()
{
rm -rf /tmp/$$.log.txt
Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/task_python_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ set -u
source tests/scripts/setup-pytest-env.sh
export PYTHONPATH=${PYTHONPATH}:${TVM_PATH}/apps/extension/python
export LD_LIBRARY_PATH="build:${LD_LIBRARY_PATH:-}"

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export TVM_NUM_THREADS=2

Expand Down
5 changes: 5 additions & 0 deletions tests/scripts/task_python_topi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ set -e
set -u

source tests/scripts/setup-pytest-env.sh

# to avoid CI thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

# Rebuild cython
make cython3

Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_python_vta_fsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ set -e
set -u

source tests/scripts/setup-pytest-env.sh
# to avoid CI thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

export PYTHONPATH=${PYTHONPATH}:${TVM_PATH}/vta/python
export VTA_HW_PATH=`pwd`/3rdparty/vta-hw

Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_python_vta_tsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ source tests/scripts/setup-pytest-env.sh
export PYTHONPATH=${PYTHONPATH}:${TVM_PATH}/vta/python
export VTA_HW_PATH=`pwd`/3rdparty/vta-hw

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

# cleanup pycache
find . -type f -path "*.pyc" | xargs rm -f

Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export RUST_DIR="$TVM_HOME/rust"
export LLVM_CONFIG_PATH=`which llvm-config-10`
echo "Using $LLVM_CONFIG_PATH"

# to avoid CI CPU thread throttling.
export TVM_BIND_THREADS=0
export OMP_NUM_THREADS=1

cd $RUST_DIR
cargo fmt -- --check

Expand Down

0 comments on commit 943e82a

Please sign in to comment.