-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
release/18x: [OpenMP][AIX] Affinity implementation for AIX (#84984) #86695
Conversation
I think it's fine. WDYT? @tstellar |
@kkwli What do you think about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this feature is needed for the vendor release, we can make exception for this patch.
This patch implements `affinity` for AIX, which is quite different from platforms such as Linux. - Setting CPU affinity through masks and related functions are not supported. System call `bindprocessor()` is used to bind a thread to one CPU per call. - There are no system routines to get the affinity info of a thread. The implementation of `get_system_affinity()` for AIX gets the mask of all available CPUs, to be used as the full mask only. - Topology is not available from the file system. It is obtained through system SRAD (Scheduler Resource Allocation Domain). This patch has run through the libomp LIT tests successfully with `affinity` enabled. (cherry picked from commit d394f3a)
1158e9e
to
47aac49
Compare
Hi @xingxue-ibm (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. |
Thank you very much, @tstellar! We don't have anything specific to add to the release notes at this point. |
This patch implements
affinity
for AIX, which is quite different from platforms such as Linux.bindprocessor()
is used to bind a thread to one CPU per call.get_system_affinity()
for AIX gets the mask of all available CPUs, to be used as the full mask only.This patch has run through the libomp LIT tests successfully with
affinity
enabled.(cherry picked from commit d394f3a)
Note: We need to include this patch in the libomp of the next IBM OpenXL for AIX compiler deliverable which is built off LLVM v18. This cherry-pick has been re-based on
release/18.x
. Changes in this patch are guarded for AIX and should not affect other platforms.