[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG932c63550ad5: [HIP] link HIP runtime library without --hip-link (authored by yaxunl). Herald added a project

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan accepted this revision. scchan added a comment. LGTM thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:71 +In the above command, the ``--hip-link`` flag instructs Clang to link the HIP runtime library. However, +the use of this flag is unnecessary if a HIP input file is al

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan added inline comments. Comment at: clang/docs/HIPSupport.rst:71 +In the above command, the ``--hip-link`` flag instructs Clang to link the HIP runtime library. However, +the use of this flag is unnecessary if a HIP input file is already present in your program. + ---

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LG, thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 ___ cfe-commits mailing list cfe-

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544750. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 Files: clang/docs/HIPSupport.rst clang/lib/Driver/ToolChains/

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Driver.h:712 + /// Whether there are HIP input files. + bool hasHIPInputs() const { return HasHIPInputs; } + jhuber6 wrote: > Shouldn't we have access

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Driver.h:712 + /// Whether there are HIP input files. + bool hasHIPInputs() const { return HasHIPInputs; } + Shouldn't we have access to the compilation? I figured we could check `C.getActiv

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156426#4538646 , @jhuber6 wrote: > 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

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. 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`. CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, scchan, MaskRay, jhuber6. Herald added a project: All. yaxunl requested review of this revision. When doing combined compilation/link for HIP source files, clang should link the HIP runtime library automatically without `--hip-link`. ht