[all-commits] [llvm/llvm-project] 2ff385: [OpenMP] Add absolute KMP_HW_SUBSET functionality ...

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Wed Apr 3 09:43:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ff3850ea19f72573d8abdf9a78e52d3dfdd90ac
      https://github.com/llvm/llvm-project/commit/2ff3850ea19f72573d8abdf9a78e52d3dfdd90ac
  Author: Jonathan Peyton <jonathan.l.peyton at intel.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M openmp/docs/design/Runtimes.rst
    M openmp/runtime/src/kmp_affinity.cpp
    M openmp/runtime/src/kmp_affinity.h
    A openmp/runtime/test/affinity/kmp-abs-hw-subset.c

  Log Message:
  -----------
  [OpenMP] Add absolute KMP_HW_SUBSET functionality (#85326)

Users can put a : in front of KMP_HW_SUBSET to indicate that the
specified subset is an "absolute" subset. Currently, when a user puts
KMP_HW_SUBSET=1t. This gets translated to KMP_HW_SUBSET="*s,*c,1t",
where * means "use all of". If a user wants only one thread as the
entire topology they can now do KMP_HW_SUBSET=:1t.

Along with the absolute syntax is a fix for newer machines and making
them easier to use with only the 3-level topology syntax. When a user
puts KMP_HW_SUBSET=1s,4c,2t on a machine which actually has 4 layers,
(say 1s,2m,3c,2t as the entire machine) the user gets an unexpected "too
many resources asked" message because KMP_HW_SUBSET currently translates
the "4c" value to mean 4 cores per module. To help users out, the
runtime can assume that these newer layers, module in this case, should
be ignored if they are not specified, but the topology should always
take into account the sockets, cores, and threads layers.



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