[PATCH] D125050: [OpenMP] Try to Infer target triples using the offloading architecture
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 6 11:01:36 PDT 2022
jhuber6 added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:789
+ (C.getInputArgs().hasArg(options::OPT_fopenmp_targets_EQ) ||
+ C.getInputArgs().hasArg(options::OPT_offload_arch_EQ));
+ if (IsOpenMPOffloading) {
----------------
yaxunl wrote:
> probably should be
>
> C.getInputArgs().hasArg(options::OPT_offload_arch_EQ) && !IsHIP && !IsCUDA
>
> otherwise a HIP program may get both HIP offloading and OpenMP offloading at the same time. Currently it is not supported.
I do that below, line 815. The logic states that we only take `--offloading-arch` to imply OpenMP offloading if it's not currently CUDA or HIP. I'm pretty sure there's an existing test that covers this as it used to fail one of those HIP-interop tests until I added `!IsHIP && !IsCUDA` below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125050/new/
https://reviews.llvm.org/D125050
More information about the cfe-commits
mailing list