Skip to content

Commit

Permalink
tst ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedbb committed Jul 3, 2019
1 parent 0f186a0 commit 3914a11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions continuous_integration/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ fi
set -x
PYTHONPATH="." python continuous_integration/display_versions.py

# by default BLIS is single-threaded. Enable multi-threading to run the tests
if [[ "$INSTALL_BLIS" == "true" ]]; then
export BLIS_NUM_THREADS=4
fi

pytest -vlrxXs --junitxml=$JUNITXML --cov=threadpoolctl
4 changes: 4 additions & 0 deletions threadpoolctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ def threadpool_info():
modules = _load_modules(user_api=_ALL_USER_APIS)
for module in modules:
module['num_threads'] = module['get_num_threads']()
# by default BLIS is single-threaded and get_num_threads returns -1.
# we map it to 1 for consistency with other libraries.
if module['num_threads'] == -1 and module['internal_api'] == 'blis':
module['num_threads'] = 1
# Remove the wrapper for the module and its function
del module['set_num_threads'], module['get_num_threads']
del module['dynlib']
Expand Down

0 comments on commit 3914a11

Please sign in to comment.