jdoerfert wrote: > I see it in a different way. `#pragma omp target parallel` (let's just assume > this is valid code) is different from `#pragma omp parallel`, no matter what > target is. However, this patch is to say, when targeting a GPU, `#pragma omp > parallel` **is** `#pragma omp target parallel`. We have to talk about > _internal_ details here because we are implementing the standard.
This is not the case. This patch does not make omp parallel the same as omp target parallel. This patch does however implement omp parallel with _parallel_51, if the target is a GPU, and otherwise with fork_threads. From the standard perspective, what we provide is the semantics of omp parallel, the implementation just happens to be different on the targets. target parallel means "try to offload, then parallel", which for the host still does that. If your triple now is a GPU, we would not implement it as a parallel, not with this patch. We should either emit an error, or emit a task containing a parallel, effectively emitting the fallback only. 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