Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

[WIP] Test hip nvidia #29

Draft
wants to merge 39 commits into
base: hip_rebased
Choose a base branch
from

Conversation

masterleinad
Copy link

No description provided.

masterleinad and others added 30 commits February 7, 2020 14:10
Testing of TPL imports with clang revealed the following issues:

1. <TPL>_ROOT variables could be specified as command line options,
   e.g. `cmake -D<TPL>_ROOT=/path/to/tpl ..`, but not as environment
   variables, e.g. `<TPL>_ROOT=/path/to/tpl cmake ..`. This differs
   from standard find_package/find_library behavior and can be confusing
   when TPL search fails.

2. kokkos_find_library and kokkos_find_header were using <NAME>_FOUND
   to bypass multiple searches, however, the CMAKE functions find_library
   and find_path do not set this variable. Replaced with checking of
   <NAME>_LOCATION directly (further refactor possible).

3. The set of possible suffixes for <TPL>_ROOT, KOKKOS_<TPL>_DIR, etc.
   was not sufficent to locate libcuda in the "CUDA_ROOT/lib64/stubs"
   subdirectory. This non-functional libcuda is important for cross-
   compiling when the device driver is not installed on the host
   machine (e.g. cluster login node)
Refactored these routines using the fact that (1) CMake will silently
expand un-set variables to the empty string (2) PATHS to find_library
and find_path are searched in order provided (3) if the output variable
is set to something other than <VAR>-NOTFOUND, calls to find_library
and find_path will do nothing (output variable must be cleared).
Kokkos team requested that lib/stubs, lib64/stubs library
search suffixes be added to the suffix list only when searching
for CUDA. This commit adds options to kokkos_find_imported and
kokkos_find_library to allow the library search suffixes to be
set by the caller. It also updates FindTPLCUDA to use this
feature to add the stub directories to the search list.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants