CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
125 lines
3.2 KiB
Fortran
125 lines
3.2 KiB
Fortran
! RUN: split-file %s %t
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/do_loop_with_stop.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK1
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/do_loop_with_cycle_goto.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK2
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/nested_goto_loop.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK3
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/nested_loop_with_inner_goto.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK4
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/collapse.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK5
|
|
! RUN: %not_todo_cmd bbc -fopenacc -emit-hlfir %t/collapse_nested.f90 -o - 2>&1 | FileCheck %s --check-prefix=CHECK6
|
|
|
|
//--- do_loop_with_stop.f90
|
|
|
|
subroutine do_loop_with_stop()
|
|
integer :: i
|
|
integer, parameter :: n = 10
|
|
real, dimension(n) :: a, b
|
|
|
|
!$acc kernels
|
|
do i = 1, n
|
|
a(i) = b(i) + 1.0
|
|
if (i == 5) stop
|
|
end do
|
|
!$acc end kernels
|
|
|
|
! CHECK1: not yet implemented: unstructured do loop in acc kernels
|
|
|
|
end subroutine
|
|
|
|
//--- do_loop_with_cycle_goto.f90
|
|
|
|
subroutine do_loop_with_cycle_goto()
|
|
integer :: i
|
|
integer, parameter :: n = 10
|
|
real, dimension(n) :: a, b
|
|
|
|
! Do loop with cycle and goto - unstructured control flow is not converted.
|
|
!$acc kernels
|
|
do i = 1, n
|
|
if (i == 3) cycle
|
|
a(i) = b(i) + 1.0
|
|
if (i == 7) goto 200
|
|
a(i) = a(i) * 2.0
|
|
end do
|
|
200 continue
|
|
!$acc end kernels
|
|
|
|
! CHECK2: not yet implemented: unstructured do loop in acc kernels
|
|
|
|
end subroutine
|
|
|
|
//--- nested_goto_loop.f90
|
|
|
|
subroutine nested_goto_loop()
|
|
integer :: i, j
|
|
integer, parameter :: n = 10, m = 5
|
|
real, dimension(n,m) :: a, b
|
|
|
|
! Nested loop with goto from inner to outer - should NOT convert to acc.loop
|
|
!$acc kernels
|
|
do i = 1, n
|
|
do j = 1, m
|
|
a(i,j) = b(i,j) + 1.0
|
|
if (i * j > 20) goto 300 ! Exit both loops
|
|
end do
|
|
end do
|
|
300 continue
|
|
!$acc end kernels
|
|
|
|
! CHECK3: not yet implemented: unstructured do loop in acc kernels
|
|
|
|
end subroutine
|
|
|
|
//--- nested_loop_with_inner_goto.f90
|
|
|
|
subroutine nested_loop_with_inner_goto()
|
|
integer :: ii = 0, jj = 0
|
|
integer, parameter :: nn = 3
|
|
real, dimension(nn, nn) :: aa
|
|
|
|
aa = -1
|
|
|
|
! Nested loop with goto from inner loop - unstructured control flow is not converted.
|
|
!$acc kernels
|
|
do ii = 1, nn
|
|
do jj = 1, nn
|
|
if (jj > 1) goto 300
|
|
aa(jj, ii) = 1337
|
|
end do
|
|
300 continue
|
|
end do
|
|
!$acc end kernels
|
|
|
|
! CHECK4: not yet implemented: unstructured do loop in acc kernels
|
|
|
|
end subroutine
|
|
|
|
//--- collapse.f90
|
|
|
|
! !$acc parallel loop collapse(N) over a do concurrent.
|
|
subroutine combined(i, j, k)
|
|
integer :: i, j, k
|
|
integer :: a(i,j,k)
|
|
!$acc parallel loop collapse(3)
|
|
do concurrent (i=1:10, j=1:100, k=1:200)
|
|
a(i,j,k) = a(i,j,k) + 1
|
|
end do
|
|
! CHECK5: not yet implemented: OpenACC LOOP COLLAPSE with DO CONCURRENT
|
|
end subroutine
|
|
|
|
|
|
//--- collapse_nested.f90
|
|
|
|
! !$acc parallel loop collapse(N) over a nested do concurrent.
|
|
subroutine combined(i, j, k)
|
|
integer :: i, j, k
|
|
integer :: a(i,j,k)
|
|
!$acc parallel loop collapse(3)
|
|
do i = 1, 10
|
|
do concurrent (j=1:100, k=1:200)
|
|
a(i,j,k) = a(i,j,k) + 1
|
|
end do
|
|
end do
|
|
! CHECK6: not yet implemented: OpenACC LOOP with nested DO CONCURRENT
|
|
|
|
end subroutine
|
|
|