File: acc-routine.f90

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (127 lines) | stat: -rw-r--r-- 4,462 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
! This test checks lowering of OpenACC routine directive.

! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s

! CHECK: acc.routine @acc_routine_17 func(@_QPacc_routine19) bind("_QPacc_routine17" [#acc.device_type<host>], "_QPacc_routine17" [#acc.device_type<default>], "_QPacc_routine16" [#acc.device_type<multicore>])
! CHECK: acc.routine @acc_routine_16 func(@_QPacc_routine18) bind("_QPacc_routine17" [#acc.device_type<host>], "_QPacc_routine16" [#acc.device_type<multicore>])
! CHECK: acc.routine @acc_routine_15 func(@_QPacc_routine17) worker ([#acc.device_type<host>]) vector ([#acc.device_type<multicore>])
! CHECK: acc.routine @acc_routine_14 func(@_QPacc_routine16) gang([#acc.device_type<nvidia>]) seq ([#acc.device_type<host>])
! CHECK: acc.routine @acc_routine_10 func(@_QPacc_routine11) seq
! CHECK: acc.routine @acc_routine_9 func(@_QPacc_routine10) seq
! CHECK: acc.routine @acc_routine_8 func(@_QPacc_routine9) bind("_QPacc_routine9a")
! CHECK: acc.routine @acc_routine_7 func(@_QPacc_routine8) bind("routine8_")
! CHECK: acc.routine @acc_routine_6 func(@_QPacc_routine7) gang(dim: 1 : i64)
! CHECK: acc.routine @acc_routine_5 func(@_QPacc_routine6) nohost
! CHECK: acc.routine @acc_routine_4 func(@_QPacc_routine5) worker
! CHECK: acc.routine @acc_routine_3 func(@_QPacc_routine4) vector
! CHECK: acc.routine @acc_routine_2 func(@_QPacc_routine3) gang
! CHECK: acc.routine @acc_routine_1 func(@_QPacc_routine2) seq
! CHECK: acc.routine @acc_routine_0 func(@_QPacc_routine1)

subroutine acc_routine1()
  !$acc routine
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine1() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_0]>}

subroutine acc_routine2()
  !$acc routine seq
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine2() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_1]>}

subroutine acc_routine3()
  !$acc routine gang
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine3() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_2]>}

subroutine acc_routine4()
  !$acc routine vector
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine4() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_3]>}

subroutine acc_routine5()
  !$acc routine worker
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine5() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_4]>}

subroutine acc_routine6()
  !$acc routine nohost
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine6() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_5]>}

subroutine acc_routine7()
  !$acc routine gang(dim:1)
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine7() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_6]>}

subroutine acc_routine8()
  !$acc routine bind("routine8_")
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine8() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_7]>}

subroutine acc_routine9a()
end subroutine

subroutine acc_routine9()
  !$acc routine bind(acc_routine9a)
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine9() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_8]>}

function acc_routine10()
  !$acc routine(acc_routine10) seq
end function

! CHECK-LABEL: func.func @_QPacc_routine10() -> f32 attributes {acc.routine_info = #acc.routine_info<[@acc_routine_9]>}

subroutine acc_routine11(a)
  real :: a
  !$acc routine(acc_routine11) seq
end subroutine

! CHECK-LABEL: func.func @_QPacc_routine11(%arg0: !fir.ref<f32> {fir.bindc_name = "a"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_10]>}

subroutine acc_routine12()

  interface
  subroutine acc_routine11(a)
    real :: a
    !$acc routine(acc_routine11) seq
  end subroutine
  end interface

end subroutine

subroutine acc_routine13()
  !$acc routine bind(acc_routine14)
end subroutine

subroutine acc_routine14()
end subroutine

subroutine acc_routine15()
  !$acc routine bind(acc_routine16)
end subroutine

subroutine acc_routine16()
  !$acc routine device_type(host) seq dtype(nvidia) gang
end subroutine

subroutine acc_routine17()
  !$acc routine device_type(host) worker dtype(multicore) vector 
end subroutine

subroutine acc_routine18()
  !$acc routine device_type(host) bind(acc_routine17) dtype(multicore) bind(acc_routine16) 
end subroutine

subroutine acc_routine19()
  !$acc routine device_type(host,default) bind(acc_routine17) dtype(multicore) bind(acc_routine16) 
end subroutine