mhalk added a comment.

In D145591#4179144 <https://reviews.llvm.org/D145591#4179144>, @tra wrote:

> How is this different from compiling a C++ file with opemnp directives in it? 
> AFAICT neither clang nor gcc issue anywarnings: 
> https://godbolt.org/z/5Me3dnTdr
>
> What makes the warnings necessary for HIP?

When using HIP target offloading it will "take precedence" over OpenMP target 
offloading.
That is, there is a use case which compiles "successfully" / without warning 
but will not execute code within OpenMP target directives.

For example: when using `-x hip -fopenmp --offload-arch=...` (+ other 
reasonable parameters) a HIP program with OpenMP target directives will compile 
without warning / error.
But only host-related OpenMP code will be executed properly.

Another hint that HIP and OpenMP target offloading do not work concurrently ATM 
is that when compiling with `-x hip --fopenmp-targets=...` clang will throw an 
error.

Hence, we want to signal this issue to users, whorun into problems and then 
have to debug their programs to find out about this.
AFAIK this issue can be alleviated by refactoring / splitting up your code, 
then linking it back togehter -- but you have to know about this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145591

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to