[all-commits] [llvm/llvm-project] 14e184: HIP: Merge builtin library handling

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue May 12 06:56:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 14e184571139ba4c7347ea547074c6d9ec9c7b14
      https://github.com/llvm/llvm-project/commit/14e184571139ba4c7347ea547074c6d9ec9c7b14
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M clang/lib/Driver/ToolChains/AMDGPU.cpp
    M clang/lib/Driver/ToolChains/AMDGPU.h
    M clang/lib/Driver/ToolChains/HIP.cpp
    M clang/test/Driver/hip-device-libs.hip
    M clang/test/Driver/rocm-device-libs.cl

  Log Message:
  -----------
  HIP: Merge builtin library handling

Merge with the new --rocm-path handling used for OpenCL. This looks
for a usable set of device libraries upfront, rather than giving a
generic "no such file or directory error". If any of the required
bitcode libraries are missing, this will now produce a "cannot find
ROCm installation." error. This differs from the existing hip specific
flags by pointing to a rocm root install instead of a single directory
with bitcode files.

This tries to maintain compatibility with the existing the
--hip-device-lib and --hip-device-lib-path flags, as well as the
HIP_DEVICE_LIB_PATH environment variable, or at least the range of
uses with testcases. The existing range of uses and behavior doesn't
entirely make sense to me, so some of the untested edge cases change
behavior. Currently the two path forms seem to have the double purpose
of a search path for an arbitrary --hip-device-lib, and for finding
the stock set of libraries. Since the stock set of libraries This also
changes the behavior when multiple paths are specified, and only takes
the last one (and the environment variable only handles a single
path).

If --hip-device-lib is used, it now only treats --hip-device-lib-path
as the search path for it, and does not attempt to find the rocm
installation. If not, --hip-device-lib-path and the environment
variable are used as the directory to search instead of the rocm root
based path.

This should also automatically fix handling of the options to use
wave64.




More information about the All-commits mailing list