diff options
author | Xing Xue <xingxue@outlook.com> | 2024-04-26 13:23:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 13:23:33 -0400 |
commit | 690c929b6c68b4cd0ff314a0a88d3b218d46db2d (patch) | |
tree | cc311be13b9c91471167566f900e193cf27b6642 /openmp/runtime/src/kmp_affinity.cpp | |
parent | d2caaabf5d1532d210334d7092c2ad292334f15f (diff) | |
download | llvm-690c929b6c68b4cd0ff314a0a88d3b218d46db2d.zip llvm-690c929b6c68b4cd0ff314a0a88d3b218d46db2d.tar.gz llvm-690c929b6c68b4cd0ff314a0a88d3b218d46db2d.tar.bz2 |
[OpenMP][AIX] Use syssmt() to get the number of SMTs per physical CPU (#89985)
This patch changes to use system call `syssmt()` instead of
`lpar_get_info()` to get the number of SMTs (logical processors) per
physical processor for AIX. `lpar_get_info()` gives the max number of
SMTs that the physical processor can support while `syssmt()` returns
the number that is currently configured.
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_affinity.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index 378e5aa..f34e555 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -3038,15 +3038,7 @@ static bool __kmp_affinity_create_cpuinfo_map(int *line, KMP_INFORM(AffParseFilename, "KMP_AFFINITY", "system info for topology"); // Get the number of SMT threads per core. - int retval = - lpar_get_info(LPAR_INFO_FORMAT1, &cpuinfo, sizeof(lpar_info_format1_t)); - if (!retval) - smt_threads = cpuinfo.smt_threads; - else { - CLEANUP_THREAD_INFO; - *msg_id = kmp_i18n_str_UnknownTopology; - return false; - } + smt_threads = syssmt(GET_NUMBER_SMT_SETS, 0, 0, NULL); // Allocate a resource set containing available system resourses. rsethandle_t sys_rset = rs_alloc(RS_SYSTEM); |