[Mlir-commits] [mlir] [NFC][OpenMP][MLIR] Add test for lowering parallel workshare GPU loop (PR #76144)
Dominik Adamski
llvmlistbot at llvm.org
Thu Dec 21 08:05:04 PST 2023
DominikAdamski wrote:
The MLIR test case was reduced by hand.
The initial code was similar to:
```
subroutine test(i, beta) bind(C)
!$omp declare target
use ISO_C_BINDING
integer (C_INT), dimension(*), intent(out) :: beta
integer (C_INT), value :: i
!$omp parallel
!$omp do
do i = 1, 10
beta(i) = i
end do
!$omp end do
!$omp end parallel
end subroutine
```
I am able to generate test-openmp-amdgcn-amd-amdhsa-gfx90a-llvmir.mlir file by command:
`flang-new -save-temps -c -fopenmp --offload-arch=gfx90a test.f95`
Or:
`flang-new -fc1 -triple amdgcn-amd-amdhsa -emit-llvm-bc -fopenmp -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu gfx90a -fopenmp-host-ir-file-path test-host-x86_64-unknown-linux-gnu.bc -fopenmp-is-target-device -mframe-pointer=all -o test-openmp-amdgcn-amd-amdhsa-gfx90a.tmp.bc -save-temps=cwd -x f95 test-openmp-amdgcn-amd-amdhsa-gfx90a.i`
https://github.com/llvm/llvm-project/pull/76144
More information about the Mlir-commits
mailing list