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

Michael Halkenhäuser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 10 09:12:18 PST 2023


mhalk added inline comments.
Herald added a subscriber: sunshaoce.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8634
+def warn_hip_omp_target_directives : Warning<
+  "HIP does not support OpenMP target directives; directive has been ignored">,
+  InGroup<HIPOpenMPOffloading>;
----------------
jdoerfert wrote:
> I doubt the ignored part very much.
I just re-checked the LLVM IR of an example.
With -x c++ there are __kmpc_target_(de)init calls; with -x hip there are none.
https://godbolt.org/z/fhds46Pvc

>From my point of view, "effectively", target directives seem to have been ignored.
Maybe this is a coincidence (there's definitely some uncertainty) or I am misinterpreting the IR.
I would be glad if you could shed some light on this, if possible / you find the time to do so.


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