[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-12-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D139045#3964875 , @tra wrote: > In any case, I think this is something that may need a wider forum. Ask on > LLVM discourse? RFC opened at discord https://discourse.llvm.org/t/rfc-let-clang-use-system-gpu-as-default-offload-

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-12-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D139045#3962354 , @yaxunl wrote: > I understand your point. However, when users use gcc or clang and do not > specify target or CPU, the compiled program will execute on their system. > This is because gcc or clang has a default

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-12-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 479365. yaxunl added a comment. fix error handling CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139045/new/ https://reviews.llvm.org/D139045 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/AMDGPU.h Index: clang/lib/Driver/ToolC

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D139045#3961931 , @tra wrote: >> This patch detects system GPU and use them in --offload-arch if not >> specified. If system GPU cannot be detected clang will fall back to gfx803. > > I don't think auto-probing is something we

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > This patch detects system GPU and use them in --offload-arch if not > specified. If system GPU cannot be detected clang will fall back to gfx803. I don't think auto-probing is something we want to do by default. IMO, we should be following `-march=native` behavior here an

[PATCH] D139045: [HIP] use detected GPU in --offload-arch

2022-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kosarev, kerbowa, jvesely. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. Currently HIP uses gfx803 as offload arch if not specified. This is not conven