This is an archive of the discontinued LLVM Phabricator instance.

Warning is emitted when tiles are requested but cannot be used
ClosedPublic

Authored by omalyshe on Nov 22 2017, 3:36 AM.

Details

Summary

Added two warnings:

before building the topology map check if tiles are requested but the topo method is not hwloc;

after building the topology map check if tiles are requested but not detected by the library.

Diff Detail

Repository
rL LLVM

Event Timeline

omalyshe created this revision.Nov 22 2017, 3:36 AM
This revision is now accepted and ready to land.Nov 27 2017, 11:38 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.
ismail added a subscriber: ismail.Nov 30 2017, 2:50 AM

Hi, this fails to build (Linux x86-64):

../projects/openmp/runtime/src/kmp_affinity.cpp:3852:30: error: use of undeclared identifier 'affinity_gran_tile'; did you mean 'affinity_gran_fine'?                                         
  if (__kmp_affinity_gran == affinity_gran_tile &&
                             ^~~~~~~~~~~~~~~~~~
                             affinity_gran_fine
../projects/openmp/runtime/src/kmp.h:702:3: note: 'affinity_gran_fine' declared here
  affinity_gran_fine = 0,
  ^
../projects/openmp/runtime/src/kmp_affinity.cpp:4125:30: error: use of undeclared identifier 'affinity_gran_tile'; did you mean 'affinity_gran_fine'?                                         
  if (__kmp_affinity_gran == affinity_gran_tile && __kmp_tile_depth == 0) {
                             ^~~~~~~~~~~~~~~~~~
                             affinity_gran_fine
../projects/openmp/runtime/src/kmp.h:702:3: note: 'affinity_gran_fine' declared here
  affinity_gran_fine = 0,
  ^
../projects/openmp/runtime/src/kmp_affinity.cpp:4125:52: error: use of undeclared identifier '__kmp_tile_depth'; did you mean '__kmp_aff_depth'?                                              
  if (__kmp_affinity_gran == affinity_gran_tile && __kmp_tile_depth == 0) {
                                                   ^~~~~~~~~~~~~~~~
                                                   __kmp_aff_depth
../projects/openmp/runtime/src/kmp_affinity.cpp:3777:12: note: '__kmp_aff_depth' declared here
static int __kmp_aff_depth = 0;
           ^
3 errors generated.

I've just committed the related patch https://reviews.llvm.org/D40309 that should fix the build problem.

We should have set the dependencies between these patches initially to avoid this kind of problems...