kparzysz wrote:

> All that said, there are two cases to consider wrt. the standard:
> 
> 1. The initial device is the CPU and the code compiled here is just part of a 
> GPU library, or
> 2. the initial device is the GPU and the code compiled here is just part of 
> the "host code".
> 
> For 1), omp target, w/o ancestor, is disallowed, IIRC. For 2), it should work 
> as if it is a task, basically we do not implement "offloading" from this 
> host, which is totally fine.

Option (2) summarizes my point of view.

The use case that I have in mind for this is
```
cc -fopenmp -target=cpu -offload-target=gpu -c foo.c
cc -fopenmp -target=gpu -c bar.c
link device-part-of-foo.o bar.o -o works-on-gpu
```

https://github.com/llvm/llvm-project/pull/122149
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to