Skip to content

test: run tests with a single OpenMP thread - #210

Merged
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/test-omp-threads
Oct 16, 2026
Merged

janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/test-omp-threads

Conversation

@janickm

@janickm janickm commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Sets OMP_NUM_THREADS=1 for all tests in .bazelrc.

Bazel runs tests in parallel, and torch / numpy start one OpenMP / BLAS thread per core in every test process. On CI runners the test processes oversubscribe the CPU, which is why pytest_lidar takes 330-370s per python version on CI but 80s when run alone.

Measurements

Local, restricted to 16 cores (--run_under="taskset -c 0-15", --local_resources=cpu=16) to resemble the CI runner:

default threads OMP_NUM_THREADS=1
pytest_lidar (4 python versions in parallel), slowest 389s 82s
bazel test //... 527s 174s

On CI (build-and-test, all 71 tests):

before (release/19 push run) this PR
bazel test ... 406s 120s
slowest test (pytest_lidar) 367s 58s
build-and-test job 11m30s 7m37s

Bazel runs tests in parallel, and torch / numpy start one OpenMP / BLAS
thread per core in every test process, so the processes oversubscribe
the CPU. With the 4 python versions of the lidar test running at once on
16 cores, each run took ~390s instead of ~50s with a single thread, and
the full test suite took ~530s instead of ~175s.
@janickm
janickm merged commit 2d4263f into NVIDIA:main Oct 16, 2026
5 checks passed
@janickm
janickm deleted the dev/janickm/test-omp-threads branch October 16, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant