[all-commits] [llvm/llvm-project] 41a162: [HIP] Fix version detection for old HIP-PATH

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Jun 29 11:57:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41a1625e07e8b20dafec11f0d138031106abfad0
      https://github.com/llvm/llvm-project/commit/41a1625e07e8b20dafec11f0d138031106abfad0
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/AMDGPU.cpp
    M clang/test/Driver/hip-version.hip

  Log Message:
  -----------
  [HIP] Fix version detection for old HIP-PATH

ROCm used to install components under individual directories,
e.g. HIP installed to /opt/rocm/hip and rocblas installed to
/opt/rocm/rocblas. ROCm has transitioned to a flat directory
structure where all components are installed to /opt/rocm.
HIP-PATH and --hip-path are supposed to be /opt/rocm as
clang detect HIP version by /opt/rocm/share/hip/version.
However, some existing HIP app still uses HIP-PATH=/opt/rocm/hip.
To avoid regression, clang will also try detect share/hip/version
under the parent directory of HIP-PATH or --hip-path.
This way, the detection will work for both new HIP-PATH and
old HIP-PATH.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D154077

Fixes: SWDEV-407757




More information about the All-commits mailing list