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
115 lines
2.6 KiB
Fortran
115 lines
2.6 KiB
Fortran
! REQUIRES: openmp_runtime
|
|
|
|
! RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
|
|
|
|
! CHECK-LABEL: func @_QPdistribute_simple
|
|
subroutine distribute_simple()
|
|
! CHECK: omp.teams
|
|
!$omp teams
|
|
|
|
! CHECK: omp.distribute {
|
|
!$omp distribute
|
|
|
|
! CHECK-NEXT: omp.loop_nest
|
|
do i = 1, 10
|
|
call foo()
|
|
! CHECK: omp.yield
|
|
end do
|
|
|
|
!$omp end distribute
|
|
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine distribute_simple
|
|
|
|
!===============================================================================
|
|
! `dist_schedule` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPdistribute_dist_schedule
|
|
! CHECK-SAME: %[[X_ARG:.*]]: !fir.ref<i32>
|
|
subroutine distribute_dist_schedule(x)
|
|
! CHECK: %[[X_REF:.*]]:2 = hlfir.declare %[[X_ARG]]
|
|
integer, intent(in) :: x
|
|
|
|
! CHECK: omp.teams
|
|
!$omp teams
|
|
|
|
! STATIC SCHEDULE, CONSTANT CHUNK SIZE
|
|
|
|
! CHECK: %[[CONST_CHUNK_SIZE:.*]] = arith.constant 5 : i32
|
|
! CHECK: omp.distribute
|
|
! CHECK-SAME: dist_schedule_static
|
|
! CHECK-SAME: chunk_size(%[[CONST_CHUNK_SIZE]] : i32)
|
|
!$omp distribute dist_schedule(static, 5)
|
|
|
|
! CHECK-NEXT: omp.loop_nest
|
|
do i = 1, 10
|
|
call foo()
|
|
! CHECK: omp.yield
|
|
end do
|
|
|
|
!$omp end distribute
|
|
|
|
! STATIC SCHEDULE, VARIABLE CHUNK SIZE
|
|
|
|
! CHECK: %[[X:.*]] = fir.load %[[X_REF]]#0
|
|
! CHECK: omp.distribute
|
|
! CHECK-SAME: dist_schedule_static
|
|
! CHECK-SAME: chunk_size(%[[X]] : i32)
|
|
!$omp distribute dist_schedule(static, x)
|
|
|
|
! CHECK-NEXT: omp.loop_nest
|
|
do i = 1, 10
|
|
call foo()
|
|
! CHECK: omp.yield
|
|
end do
|
|
|
|
!$omp end distribute
|
|
|
|
! STATIC SCHEDULE, NO CHUNK SIZE
|
|
|
|
! CHECK: omp.distribute
|
|
! CHECK-SAME: dist_schedule_static
|
|
! CHECK-NOT: chunk_size
|
|
!$omp distribute dist_schedule(static)
|
|
|
|
! CHECK-NEXT: omp.loop_nest
|
|
do i = 1, 10
|
|
call foo()
|
|
! CHECK: omp.yield
|
|
end do
|
|
|
|
!$omp end distribute
|
|
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine distribute_dist_schedule
|
|
|
|
!===============================================================================
|
|
! `allocate` clause
|
|
!===============================================================================
|
|
|
|
! CHECK-LABEL: func @_QPdistribute_allocate
|
|
subroutine distribute_allocate()
|
|
use omp_lib
|
|
integer :: x
|
|
! CHECK: omp.teams
|
|
!$omp teams
|
|
|
|
! CHECK: omp.distribute
|
|
! CHECK-SAME: allocate(%{{.+}} : i64 -> %{{.+}} : !fir.ref<i32>)
|
|
!$omp distribute allocate(omp_high_bw_mem_alloc: x) private(x)
|
|
|
|
! CHECK-NEXT: omp.loop_nest
|
|
do i = 1, 10
|
|
x = i
|
|
! CHECK: omp.yield
|
|
end do
|
|
|
|
!$omp end distribute
|
|
|
|
! CHECK: omp.terminator
|
|
!$omp end teams
|
|
end subroutine distribute_allocate
|