Skip to content

release/18.x: [OpenMP] Fix child processes to use affinity_none (#91391) #91479

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

Merged
merged 1 commit into from
May 10, 2024

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented May 8, 2024

Backport 73bb8d9

Requested by: @jpeyton52

@llvmbot llvmbot added this to the LLVM 18.X Release milestone May 8, 2024
@llvmbot
Copy link
Member Author

llvmbot commented May 8, 2024

@jhuber6 What do you think about merging this PR to the release branch?

@llvmbot llvmbot requested a review from jhuber6 May 8, 2024 14:33
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label May 8, 2024
@jpeyton52
Copy link
Contributor

@jhuber6 , Sorry, I'm not used to backporting. Are you the right person for this?

@jhuber6
Copy link
Contributor

jhuber6 commented May 10, 2024

@jhuber6 What do you think about merging this PR to the release branch?

This PR should be merged.

@jhuber6 , Sorry, I'm not used to backporting. Are you the right person for this?

AFAIK the bot asking is automated and then a human pushes the button.

When a child process is forked with OpenMP already initialized, the
child process resets its affinity mask and sets proc-bind-var to false
so that the entire original affinity mask is used. This patch corrects
an issue with the affinity initialization code setting affinity to
compact instead of none for this special case of forked children.

The test trying to catch this only testing explicit setting of
KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting.

Fixes: llvm#91098
(cherry picked from commit 73bb8d9)
@tstellar tstellar merged commit 09615ce into llvm:release/18.x May 10, 2024
4 checks passed
@tstellar
Copy link
Collaborator

Hi @jpeyton52 (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
Development

Successfully merging this pull request may close these issues.

4 participants