[all-commits] [llvm/llvm-project] 47aac4: [OpenMP][AIX] Affinity implementation for AIX (#84...

Xing Xue via All-commits all-commits at lists.llvm.org
Mon Apr 1 13:56:14 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 47aac495c89554bb61ee13a3a32823feec4bf5b4
      https://github.com/llvm/llvm-project/commit/47aac495c89554bb61ee13a3a32823feec4bf5b4
  Author: Xing Xue <xingxue at outlook.com>
  Date:   2024-03-30 (Sat, 30 Mar 2024)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_affinity.cpp
    M openmp/runtime/src/kmp_affinity.h
    M openmp/runtime/src/kmp_os.h
    M openmp/runtime/src/z_Linux_util.cpp
    M openmp/runtime/test/lit.cfg

  Log Message:
  -----------
  [OpenMP][AIX] Affinity implementation for AIX (#84984)

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 d394f3a162b871668d0c8e8bf6a94922fa8698ae)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list