Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up parallelized CI #378

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Speed up parallelized CI #378

merged 1 commit into from
Nov 14, 2023

Conversation

eb8680
Copy link
Contributor

@eb8680 eb8680 commented Nov 14, 2023

This PR adds MKL_NUM_THREADS=1 to the unit test run in our CI workflow. This environment variable restricts the maximum number of CPU threads that an Intel MKL implementation of a tensor operation can use. When running many small PyTorch computations in parallel processes on an Intel CPU, operation-level parallelism within kernels can interfere with process-level parallelism, resulting in significant slowdowns compared to executing operation kernels within the process that invoked them. This tweak seems to have reduced our unit test CI times by ~25%.

@eb8680 eb8680 added testing status:WIP Work-in-progress not yet ready for review labels Nov 14, 2023
@eb8680 eb8680 self-assigned this Nov 14, 2023
@eb8680 eb8680 changed the title Investigate (lack of) speedup in parallelized CI Speed up parallelized CI Nov 14, 2023
@eb8680 eb8680 requested a review from SamWitty November 14, 2023 17:28
@eb8680 eb8680 added status:awaiting review Awaiting response from reviewer and removed status:WIP Work-in-progress not yet ready for review labels Nov 14, 2023
@eb8680 eb8680 merged commit d6a3521 into master Nov 14, 2023
4 checks passed
@eb8680 eb8680 deleted the eb-fix-ci-parallel branch November 14, 2023 19:30
rfl-urbaniak pushed a commit that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting review Awaiting response from reviewer testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants