File: attr-amdgpu-max-num-workgroups.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (138 lines) | stat: -rw-r--r-- 4,475 bytes parent folder | download | duplicates (6)
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
128
129
130
131
132
133
134
135
136
137
138
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s

; Attribute not specified.
; CHECK-LABEL: {{^}}empty_no_attribute:
define amdgpu_kernel void @empty_no_attribute() {
entry:
  ret void
}

; Ignore if number of work groups for x dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_x0:
define amdgpu_kernel void @empty_max_num_workgroups_x0() #0 {
entry:
  ret void
}
attributes #0 = {"amdgpu-max-num-workgroups"="0,2,3"}

; Ignore if number of work groups for y dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_y0:
define amdgpu_kernel void @empty_max_num_workgroups_y0() #1 {
entry:
  ret void
}
attributes #1 = {"amdgpu-max-num-workgroups"="1,0,3"}

; Ignore if number of work groups for z dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_z0:
define amdgpu_kernel void @empty_max_num_workgroups_z0() #2 {
entry:
  ret void
}
attributes #2 = {"amdgpu-max-num-workgroups"="1,2,0"}

; CHECK-LABEL: {{^}}empty_max_num_workgroups_1_2_3:
define amdgpu_kernel void @empty_max_num_workgroups_1_2_3() #3 {
entry:
  ret void
}
attributes #3 = {"amdgpu-max-num-workgroups"="1,2,3"}

; CHECK-LABEL: {{^}}empty_max_num_workgroups_1024_1024_1024:
define amdgpu_kernel void @empty_max_num_workgroups_1024_1024_1024() #4 {
entry:
  ret void
}
attributes #4 = {"amdgpu-max-num-workgroups"="1024,1024,1024"}



; Ignore if number of work groups for x dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_x_max:
define amdgpu_kernel void @empty_max_num_workgroups_x_max() #5 {
entry:
  ret void
}
attributes #5 = {"amdgpu-max-num-workgroups"="4294967295,2,3"}

; Ignore if number of work groups for y dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_y_max:
define amdgpu_kernel void @empty_max_num_workgroups_y_max() #6 {
entry:
  ret void
}
attributes #6 = {"amdgpu-max-num-workgroups"="1,4294967295,3"}

; Ignore if number of work groups for z dimension is 0.
; CHECK-LABEL: {{^}}empty_max_num_workgroups_z_max:
define amdgpu_kernel void @empty_max_num_workgroups_z_max() #7 {
entry:
  ret void
}
attributes #7 = {"amdgpu-max-num-workgroups"="1,2,4294967295"}


; CHECK: .amdgpu_metadata
; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .name:           empty_no_attribute
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_y: 2
; CHECK-NEXT:   .max_num_workgroups_z: 3
; CHECK-NEXT:   .name:           empty_max_num_workgroups_x0
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1
; CHECK-NEXT:   .max_num_workgroups_z: 3
; CHECK-NEXT:   .name:           empty_max_num_workgroups_y0
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1
; CHECK-NEXT:   .max_num_workgroups_y: 2
; CHECK-NEXT:   .name:           empty_max_num_workgroups_z0
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1
; CHECK-NEXT:   .max_num_workgroups_y: 2
; CHECK-NEXT:   .max_num_workgroups_z: 3
; CHECK-NEXT:   .name:           empty_max_num_workgroups_1_2_3
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1024
; CHECK-NEXT:   .max_num_workgroups_y: 1024
; CHECK-NEXT:   .max_num_workgroups_z: 1024
; CHECK-NEXT:   .name:           empty_max_num_workgroups_1024_1024_1024
; CHECK-NEXT:   .private_segment_fixed_size: 0


; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_y: 2
; CHECK-NEXT:   .max_num_workgroups_z: 3
; CHECK-NEXT:   .name:           empty_max_num_workgroups_x_max
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1
; CHECK-NEXT:   .max_num_workgroups_z: 3
; CHECK-NEXT:   .name:           empty_max_num_workgroups_y_max
; CHECK-NEXT:   .private_segment_fixed_size: 0

; CHECK: - .args:
; CHECK:        .max_flat_workgroup_size: 1024
; CHECK-NEXT:   .max_num_workgroups_x: 1
; CHECK-NEXT:   .max_num_workgroups_y: 2
; CHECK-NEXT:   .name:           empty_max_num_workgroups_z_max
; CHECK-NEXT:   .private_segment_fixed_size: 0