JonChesterfield added inline comments.
================
Comment at: clang/tools/amdgpu-arch/CMakeLists.txt:9
+
+find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS 
/opt/rocm)
+if (NOT ${hsa-runtime64_FOUND})
----------------
t-tye wrote:
> JonChesterfield wrote:
> > JonChesterfield wrote:
> > > gregrodgers wrote:
> > > > What happens when /opt/rocm is not available?   Again, we need a 
> > > > cross-architecture mechanism to identify the offload-arch. 
> > > Exactly the same as the amdgpu plugin. The cmake detection is char for 
> > > char identical. This will look in CMAKE_INSTALL_PREFIX, which is where I 
> > > install these libs when using trunk, and falls back to /opt/rocm which 
> > > seems to be convenient for some users.
> > Which may need revising at some point - I like installing hsa as if it was 
> > an llvm subcomponent, but other people might want a different convention. 
> > As long as we remember to change this file + amdgpu's cmake at the same 
> > time, all good.
> /opt/tocm will not work with the side-by-side ROCm installation which 
> installs ROCm in directories with the version number. Should there be the 
> ability to configure this?
If /opt/rocm isn't a safe out of the box option for finding rocm, let's remove 
that from here and the amdgpu plugin. Pre-existing hazard so doesn't need to 
block this patch.

I'm installing roct and rocr to the same CMAKE_INSTALL_PREFIX as llvm which is 
why the first clause works out.

How are the rocm components meant to find the corresponding pieces? If there's 
a rocm cmake install dir variable we could add that to the hints.





Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99949/new/

https://reviews.llvm.org/D99949

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to