JonChesterfield added inline comments.

================
Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:50
+#else
+  return printGPUsByHSA();
+#endif
----------------
yaxunl wrote:
> jhuber6 wrote:
> > arsenm wrote:
> > > The HIP path should work on linux too. I generally think we should build 
> > > as much code as possible on all hosts, so how about
> > > ```
> > > #ifndef _WIN32
> > >   if (tryHSA())
> > >     return 0;
> > > #endif
> > > 
> > > tryHIP()
> > > ```
> > > 
> > > 
> > > 
> > That'd be fine, I'm in favor of sticking to HSA since it's a smaller 
> > runtime that's more reasonable to build standalone without the whole ROCm 
> > stack.
> done
I can't think of a case on linux where HIP would work and HSA would not, given 
that HIP calls into HSA to do the same query. So I think this fallback path 
only contributes to line noise when HSA doesn't load, 

```
./bin/amdgpu-arch 
Failed to 'dlopen' libhsa-runtime64.so
Failed to load libamdhip64.so: libamdhip64.so: cannot open shared object file: 
No such file or directory
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153725

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

Reply via email to