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

set default num_cpu_threads_per_process to improve oob performance #562

Merged
merged 2 commits into from
Jul 26, 2022
Merged

set default num_cpu_threads_per_process to improve oob performance #562

merged 2 commits into from
Jul 26, 2022

Conversation

sywangyi
Copy link
Contributor

Signed-off-by: Wang, Yi A [email protected]

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 25, 2022

The documentation is not available anymore as the PR was closed or merged.

@sywangyi
Copy link
Contributor Author

@sgugger @yao-matrix @liangan1 please help review it

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

src/accelerate/commands/launch.py Outdated Show resolved Hide resolved
src/accelerate/commands/launch.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating! Left a couple more nits.

if args.num_cpu_threads_per_process == 0:
args.num_cpu_threads_per_process = 1
logger.warn(
f"num_cpu_threads_per_process unset, we pick as {args.num_cpu_threads_per_process} to improve oob performance"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"num_cpu_threads_per_process unset, we pick as {args.num_cpu_threads_per_process} to improve oob performance"
f"num_cpu_threads_per_process unset, we set it at {args.num_cpu_threads_per_process} to improve oob performance."

src/accelerate/commands/launch.py Outdated Show resolved Hide resolved
src/accelerate/commands/launch.py Outdated Show resolved Hide resolved
Signed-off-by: Wang, Yi A <[email protected]>
@sgugger sgugger merged commit bf0017f into huggingface:main Jul 26, 2022
@sywangyi sywangyi deleted the set_default_omp_thread branch December 15, 2022 07:11
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.

3 participants