This is an archive of the discontinued LLVM Phabricator instance.

Expose the option to disable building with ITT
AbandonedPublic

Authored by hfinkel on Mar 17 2016, 8:21 AM.

Details

Summary

For the purposes of building the OpenMP runtime library on non-x86 platforms (especially when statically linking because ittnotify_static.c calls dlopen, etc.), ITT sometimes needs to be disabled. We currently have an option for this, but it is forced on. Making this an option allows turning this off without editing the CMake file.

Diff Detail

Event Timeline

hfinkel updated this revision to Diff 50934.Mar 17 2016, 8:21 AM
hfinkel retitled this revision from to Expose the option to disable building with ITT.
hfinkel updated this object.
hfinkel added a subscriber: openmp-commits.
runtime/CMakeLists.txt
202–203

"Right now, always." looks wrong with this change, and should probably be removed from the comment.

Looks fine.

However I do wonder whether the itt_notify code is useful at all on non-X86 systems,
since it provides the interface to Vtune, and I doubt that Vtune would be available
or happy on non-x86 machines :-).

In which case it might be better to default this off on non-X86 machines anyway.

  • Jim

James Cownie <james.h.cownie@intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438

hfinkel updated this revision to Diff 50937.Mar 17 2016, 8:34 AM

Update comment as suggested.

hfinkel marked an inline comment as done.Mar 17 2016, 8:34 AM
hfinkel added inline comments.
runtime/CMakeLists.txt
202–203

Good point.

hfinkel marked an inline comment as done.Mar 17 2016, 8:47 AM
hfinkel added a subscriber: hfinkel.
  • Original Message -----

From: "Jim Cownie via Openmp-commits" <openmp-commits@lists.llvm.org>
To: "james h cownie" <james.h.cownie@intel.com>, openmp-commits@lists.llvm.org
Sent: Thursday, March 17, 2016 10:30:22 AM
Subject: Re: [Openmp-commits] [PATCH] D18244: Expose the option to disable building with ITT

jcownie added a subscriber: jcownie.
jcownie added a comment.

Looks fine.

However I do wonder whether the itt_notify code is useful at all on
non-X86 systems,
since it provides the interface to Vtune, and I doubt that Vtune
would be available
or happy on non-x86 machines :-).

In which case it might be better to default this off on non-X86
machines anyway.

Do we have an easy way of doing this in the CMake file? It looks like I need to do something like:

if (IA32 OR INTEL64 OR MIC)
make the default on
else()
make the default off
endif()

  • Jim

James Cownie <james.h.cownie@intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438

http://reviews.llvm.org/D18244


Openmp-commits mailing list
Openmp-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-commits

mcrosier removed a subscriber: mcrosier.Mar 17 2016, 8:58 AM
jlpeyton edited edge metadata.Mar 17 2016, 9:08 AM

Do we have an easy way of doing this in the CMake file? It looks like I need to do something like:
if (IA32 OR INTEL64 OR MIC)
make the default on
else()
make the default off
endif()

That's one way, the other way (the pattern I adapted when refactoring) is to put something like this in cmake/config-ix.cmake:

# Check if itt notify is available.  Right now it is only verified to work on x86 based architectures
if(IA32 OR INTEL64 OR MIC)
  set(LIBOMP_HAVE_ITT_NOTIFY TRUE)
else()
  set(LIBOMP_HAVE_ITT_NOTIFY FALSE)
endif()

and then in CMakeLists.txt:

set(LIBOMP_USE_ITT_NOTIFY "${LIBOMP_HAVE_ITT_NOTIFY}" CACHE BOOL
  "Should itt notify interface be built?")

This had been covered by the change http://reviews.llvm.org/D20517 (commit rL270884).

hfinkel abandoned this revision.Jun 2 2016, 4:37 AM

Subsumed into D20517.