[PATCH] D145591: [clang][HIP][OpenMP] Add warning if mixed HIP / OpenMP offloading

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 9 13:31:07 PST 2023


jhuber6 added a comment.

In D145591#4182748 <https://reviews.llvm.org/D145591#4182748>, @yaxunl wrote:

> In D145591#4182360 <https://reviews.llvm.org/D145591#4182360>, @jhuber6 wrote:
>
>> I'm not a fan of the same warning being copied in 24 places. Why do we set `LangOpts.IsOpenMP` on the GPU compilation side, couldn't we just filter out the `-fopenmp` or whatever it is for the HIP job?
>
> We cannot filter out `-fopenmp` for HIP job because the host code in HIP program needs it to support "omp parallel for" etc. Filtering it will break existing HIP programs.

I mean, couldn't we just prevent the `-cc1` arguments for the HIP device compilation from using any OpenMP? Or is that breaking. I figured it was only supported for the CPU portion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145591/new/

https://reviews.llvm.org/D145591



More information about the cfe-commits mailing list