When doing combined compilation/link for HIP source files, clang should link the HIP runtime library automatically without --hip-link.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
So this is equivalent to nvcc implicitly calling -lcudart? I've had thoughts about the clang-linker-wrapper adding known runtime flags to the link job if it's not found. E.g. if we find a CUDA image we pass -lcudart.
clang/include/clang/Driver/Driver.h | ||
---|---|---|
712 ↗ | (On Diff #544736) | Shouldn't we have access to the compilation? I figured we could check C.getActiveOffloadKinds() or w/e it's called. |
clang/include/clang/Driver/Driver.h | ||
---|---|---|
712 ↗ | (On Diff #544736) | yes that is a better solution. will do |
clang/docs/HIPSupport.rst | ||
---|---|---|
71 | clang++ -xhip --offload-arch=gfx906 sample.o -o sample |
clang/docs/HIPSupport.rst | ||
---|---|---|
71 | yes. since it will create a HIP toolchain |
clang++ -xhip --offload-arch=gfx906 sample.o -o sample
would also work?