[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 3 11:34:17 PDT 2019


yaxunl added inline comments.


================
Comment at: lib/Driver/ToolChains/AMDGPU.h:25
+/// TODO: Generalize to handle libclc.
+class RocmInstallationDetector {
+private:
----------------
I don't think we should detect ROCm installation here. We are compiling code for amdgpu not only on ROCm, but also on amdgpu-pro and windows. Many cases, people want to compile code for amdgpu on systems without ROCm installed.

Compiilng code for amdgpu does not really depend on ROCm. We only depend on device library.

It makes more sense to have a AMDGPUDeviceLibDetector which works on ROCm, amdgpu-pro, and windows. Also we need an option -amdgpu-device-lib-path to override the default amdgpu device lib path.


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

https://reviews.llvm.org/D59321





More information about the cfe-commits mailing list