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
99 lines
2.5 KiB
Plaintext
99 lines
2.5 KiB
Plaintext
! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenacc
|
|
module m
|
|
real, device :: a(4,8)
|
|
real, managed, allocatable :: b(:,:)
|
|
integer, constant :: x = 1
|
|
type :: int
|
|
real :: i, s
|
|
end type int
|
|
interface operator (+)
|
|
module procedure addHost
|
|
module procedure addDevice
|
|
end interface operator (+)
|
|
contains
|
|
attributes(global) subroutine kernel(a,b,c,n,m)
|
|
integer, value :: n
|
|
integer, intent(in) :: m
|
|
real a(n,m), c(n,m)
|
|
real, managed :: b(n,m)
|
|
end
|
|
attributes(device) subroutine devsub(a,n)
|
|
integer, value :: n
|
|
real, device :: a(n)
|
|
end
|
|
subroutine test
|
|
real c(4)
|
|
allocate(b(4,8))
|
|
!ERROR: dummy argument 'm=' has ATTRIBUTES(DEVICE) but its associated actual argument has no CUDA data attribute
|
|
call kernel<<<1,32>>>(a,b,b,4,8)
|
|
!$acc parallel loop copy(c)
|
|
do j = 1, 1
|
|
call devsub(c,4) ! not checked in OpenACC construct
|
|
end do
|
|
end
|
|
attributes(global) subroutine sub1(x)
|
|
integer :: x
|
|
end
|
|
subroutine sub2()
|
|
call sub1<<<1,1>>>(x) ! actual constant to device dummy
|
|
end
|
|
function addHost(a, b) result(c)
|
|
type(int), intent(in) :: a, b
|
|
type(int) :: c
|
|
end function addHost
|
|
attributes(device) function addDevice(a, b) result(c)
|
|
type(int), device :: c
|
|
type(int), intent(in) :: a ,b
|
|
end function addDevice
|
|
attributes(global) subroutine overload(c, a, b)
|
|
type (int) :: c, a, b
|
|
c = a+b ! ok resolve to addDevice
|
|
end subroutine overload
|
|
|
|
attributes(host,device) subroutine hostdev(a)
|
|
integer :: a(*)
|
|
end subroutine
|
|
|
|
subroutine host()
|
|
integer :: a(10)
|
|
call hostdev(a) ! ok because hostdev is attributes(host,device)
|
|
end subroutine
|
|
|
|
subroutine sub_ignore_tkr_m(x, n)
|
|
!dir$ ignore_tkr (m) x
|
|
integer, unified :: x(n)
|
|
integer, value :: n
|
|
end subroutine
|
|
subroutine test_ignore_tkr_m()
|
|
integer :: host_arr(10)
|
|
integer, managed :: managed_arr(10)
|
|
call sub_ignore_tkr_m(host_arr, 10)
|
|
call sub_ignore_tkr_m(managed_arr, 10)
|
|
end subroutine
|
|
|
|
end
|
|
|
|
module assumed_type_cuda_buffers
|
|
interface generic_recv
|
|
module procedure recv_assumed_size
|
|
end interface
|
|
|
|
contains
|
|
subroutine recv_assumed_size(buf, count)
|
|
type(*) :: buf(1_8:*)
|
|
integer, intent(in) :: count
|
|
end subroutine
|
|
|
|
subroutine recv_assumed_rank(buf, count)
|
|
type(*) :: buf(..)
|
|
integer, intent(in) :: count
|
|
end subroutine
|
|
|
|
subroutine test
|
|
real, device :: d(10)
|
|
call recv_assumed_size(d, 10)
|
|
call recv_assumed_rank(d, 10)
|
|
call generic_recv(d, 10)
|
|
end subroutine
|
|
end module
|