[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 16:07:00 PDT 2022
yaxunl added inline comments.
================
Comment at: clang/include/clang/Driver/ToolChain.h:719
virtual llvm::SmallVector<BitCodeLibraryInfo, 12>
- getHIPDeviceLibs(const llvm::opt::ArgList &Args) const;
+ getAMDGPUDeviceLibs(const llvm::opt::ArgList &Args) const;
----------------
jhuber6 wrote:
> yaxunl wrote:
> > well, HIPSPV toolchain is not for AMDGPU. My thinking is that this API is to get device libraries for the toolchain, not for a specific target or platform.
> I guess the problem is that this option can't be totally generic since it's in the top-level `Toolchain` namespace. Otherwise it would get confused with CUDA's device library. What's a good common name to use for it?
This API return device libs for the toolchain.
For AMDGPU, HIPAMD, AMDGPUOpenMP toolchains, it returns device libs for AMDGPU.
For HIPSPV toolchain, it returns device libs for HIP for Intel GPUs.
If a CUDA toolchain decides to support this API, it will return device libs for CUDA.
If a toolchain needs to return device libs for multiple targets, we can add parameters to control that, although so far there is no such need.
Therefore, I don't see issue to call it getDeviceLibs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133726/new/
https://reviews.llvm.org/D133726
More information about the cfe-commits
mailing list