| Issue |
182356
|
| Summary |
[Flang][OpenMP] target private/firstprivate reports not yet implemented without delayed privatization
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
jeffreysandoval
|
I've tried a few simple Fortran test cases with `private` and `firstprivate` clauses on `omp target` constructs, and at default I encounter not yet implemented errors, e.g.:
https://godbolt.org/z/ofsdea3GT
```
not yet implemented: Unhandled clause PRIVATE in TARGET construct
```
https://godbolt.org/z/GKdE3j1xc
```
not yet implemented: Unhandled clause FIRSTPRIVATE in TARGET construct
```
Both of these tests compile successfully if I enable delayed privatization (`-mmlir --enable-delayed-privatization-staging`). From what I can tell, the emitted code looks reasonable, and I'm observing correct results for host and AMDGPU offload. On the Flang OpenMP call today, @tblah indicated that delayed privatization is expected to be working for everything except `lastprivate`, and that the error message may no longer be necessary.
There's an existing "todo" test that covers `private` on `omp target nowait`:
https://github.com/llvm/llvm-project/blob/a7b5cb83f54d310e4347ee6c5cf4ae7efdd3a82a/flang/test/Lower/OpenMP/Todo/firstprivate-target.f90#L1-L9
This test also compiles successfully with delayed privatization enabled, though I don't know if there are still issues with `firstprivate` handling for `nowait` constructs as originally mentioned in 7dd8122d4ea147a2e8b90d611e30d4c2cff4619f. FWIW, I get correct results with delayed privatization on my above test cases, even if I convert them to use `omp target nowait` followed by `omp taskwait`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs