forked from OSchip/llvm-project
Warning is emitted when tiles are requested but cannot be used
Added two warnings: 1) Before building the topology map check if tiles are requested but the topo method is not hwloc; 2) After building the topology map check if tiles are requested but not detected by the library. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D40340 llvm-svn: 319374
This commit is contained in:
parent
fa8fa044ec
commit
64249504b5
|
@ -38,7 +38,7 @@ Language "English"
|
|||
Country "USA"
|
||||
LangId "1033"
|
||||
Version "2"
|
||||
Revision "20170327"
|
||||
Revision "20170523"
|
||||
|
||||
|
||||
|
||||
|
@ -325,6 +325,8 @@ StgIgnored "%1$s: ignored because %2$s has been defined"
|
|||
# %1, -- name of ignored variable, %2 -- name of variable with higher priority.
|
||||
OBSOLETE "%1$s: overrides %3$s specified before"
|
||||
# %1, %2 -- name and value of the overriding variable, %3 -- name of overriden variable.
|
||||
AffTilesNoHWLOC "%1$s: Tiles are only supported if KMP_TOPOLOGY_METHOD=hwloc, using granularity=package instead"
|
||||
AffTilesNoTiles "%1$s: Tiles requested but were not detected on this HW, using granularity=package instead"
|
||||
OmptOutdatedWorkshare "OMPT: Cannot determine workshare type; using the default (loop) instead. "
|
||||
"This issue is fixed in an up-to-date compiler."
|
||||
|
||||
|
|
|
@ -3849,6 +3849,13 @@ static void __kmp_aux_affinity_initialize(void) {
|
|||
}
|
||||
}
|
||||
|
||||
if (__kmp_affinity_gran == affinity_gran_tile &&
|
||||
// check if user's request is valid
|
||||
__kmp_affinity_dispatch->get_api_type() == KMPAffinity::NATIVE_OS) {
|
||||
KMP_WARNING(AffTilesNoHWLOC, "KMP_AFFINITY");
|
||||
__kmp_affinity_gran = affinity_gran_package;
|
||||
}
|
||||
|
||||
int depth = -1;
|
||||
kmp_i18n_id_t msg_id = kmp_i18n_null;
|
||||
|
||||
|
@ -4115,6 +4122,11 @@ static void __kmp_aux_affinity_initialize(void) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (__kmp_affinity_gran == affinity_gran_tile && __kmp_tile_depth == 0) {
|
||||
// tiles requested but not detected, warn user on this
|
||||
KMP_WARNING(AffTilesNoTiles, "KMP_AFFINITY");
|
||||
}
|
||||
|
||||
__kmp_apply_thread_places(&address2os, depth);
|
||||
|
||||
// Create the table of masks, indexed by thread Id.
|
||||
|
|
Loading…
Reference in New Issue