Lines Matching refs:gpu
5 "gpu.launch"(%sz, %sz, %sz, %sz, %sz) ({
6 gpu.return
15 "gpu.launch"(%sz, %sz, %sz, %sz, %sz, %sz) ({
18 gpu.return
26 // @expected-note@+1 {{in 'gpu.launch' body region}}
27 gpu.launch blocks(%bx, %by, %bz) in (%sbx = %sz, %sby = %sz, %sbz = %sz)
29 // @expected-error@+1 {{expected 'gpu.terminator' or a terminator with successors}}
39 "gpu.launch_func"(%sz, %sz, %sz, %sz, %sz)
48 …// expected-error@+1 {{expected the closest surrounding module to have the 'gpu.container_module' …
49 gpu.launch_func @foo::@bar blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz)
55 module attributes {gpu.container_module} {
57 // expected-error@+1 {{'gpu.launch_func' op requires attribute 'kernel'}}
58 "gpu.launch_func"(%sz, %sz, %sz, %sz, %sz, %sz)
67 module attributes {gpu.container_module} {
69 // expected-error@+1 {{custom op 'gpu.launch_func' invalid kind of attribute specified}}
70 gpu.launch_func "foo" blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz)
77 module attributes {gpu.container_module} {
80 gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz)
87 module attributes {gpu.container_module} {
89 // expected-error@+1 {{'gpu.func' op expects parent op 'gpu.module'}}
90 gpu.func @kernel_1(%arg1 : !llvm.ptr<float>) {
91 gpu.return
98 module attributes {gpu.container_module} {
104 gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz)
111 module attributes {gpu.container_module} {
112 gpu.module @kernels { }
116 gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz)
123 module attributes {gpu.container_module} {
125 gpu.func @kernel_1(%arg1 : !llvm.ptr<float>) kernel {
126 gpu.return
132 …gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz) args(%arg…
139 module attributes {gpu.container_module} {
140 gpu.module @kernels {
141 gpu.func @kernel_1(%arg1 : !llvm.ptr<float>) {
142 gpu.return
147 // expected-error@+1 {{kernel function is missing the 'gpu.kernel' attribute}}
148 …gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz) args(%arg…
155 module attributes {gpu.container_module} {
156 gpu.module @kernels {
157 gpu.func @kernel_1(%arg1 : !llvm.ptr<float>) kernel {
158 gpu.return
164 …gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz) args(%arg…
171 module attributes {gpu.container_module} {
172 gpu.module @kernels {
173 gpu.func @kernel_1(%arg1 : f32) kernel {
174 gpu.return
180 …gpu.launch_func @kernels::@kernel_1 blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz) args(%arg…
187 module attributes {gpu.container_module} {
190 …gpu.launch_func @foo::@bar blocks in (%sz, %sz, %sz) threads in (%sz, %sz, %sz) args(%sz : index {…
199 %tIdX = "gpu.thread_id"() {dimension = "o"} : () -> (index)
208 %bDimX = "gpu.block_dim"() {dimension = "o"} : () -> (index)
217 %bIdX = "gpu.block_id"() {dimension = "o"} : () -> (index)
226 %gDimX = "gpu.grid_dim"() {dimension = "o"} : () -> (index)
235 %res = "gpu.all_reduce"(%arg0) ({}) : (f32) -> (f32)
243 %res = "gpu.all_reduce"(%arg0) ({
245 "gpu.yield"(%lhs) : (f32) -> ()
253 %res = "gpu.all_reduce"(%arg0) ({}) {op = "foo"} : (f32) -> (f32)
261 %res = "gpu.all_reduce"(%arg0) ({}) {op = "and"} : (f32) -> (f32)
269 %res = "gpu.all_reduce"(%arg0) ({
271 "gpu.yield"(%lhs) : (f32) -> ()
279 %res = "gpu.all_reduce"(%arg0) ({
281 "gpu.yield"(%lhs) : (f32) -> ()
288 // expected-error@+1 {{expected one gpu.yield operand}}
289 %res = "gpu.all_reduce"(%arg0) ({
291 "gpu.yield"(%lhs, %rhs) : (f32, f32) -> ()
298 // expected-error@+1 {{incorrect gpu.yield type}}
299 %res = "gpu.all_reduce"(%arg0) ({
302 "gpu.yield"(%one) : (i32) -> ()
309 // expected-error@+1 {{expected gpu.yield op in region}}
310 %res = "gpu.all_reduce"(%arg0) ({
320 %shfl, %pred = "gpu.shuffle"(%arg0, %arg1, %arg2) { mode = "xor" } : (f32, i32, i32) -> (i32, i1)
327 %shfl, %pred = gpu.shuffle %arg0, %arg1, %arg2 xor : index
333 gpu.module @gpu_funcs {
334 // expected-error @+1 {{custom op 'gpu.func' gpu.func requires named arguments}}
335 gpu.func @kernel_1(f32, f32) {
337 gpu.return
345 gpu.module @gpu_funcs {
347 "gpu.func"() ({
348 gpu.return
356 gpu.module @gpu_funcs {
358 gpu.func @kernel() workgroup(%0: i32) {
359 gpu.return
367 gpu.module @gpu_funcs {
369 gpu.func @kernel() workgroup(%0: memref<4xf32>) {
370 gpu.return
378 gpu.module @gpu_funcs {
380 gpu.func @kernel() private(%0: memref<4xf32>) {
381 gpu.return
389 gpu.module @gpu_funcs {
391 gpu.func @kernel() private(%0: memref<4xf32>) {
392 gpu.return
400 gpu.module @gpu_funcs {
402 gpu.func @kernel() {
404 // expected-error @+1 {{'gpu.return' op expected 0 result operands}}
405 gpu.return %0 : index
413 gpu.module @gpu_funcs {
414 // expected-error @+1 {{'gpu.func' op expected void return type for kernel function}}
415 gpu.func @kernel() -> index kernel {
417 gpu.return
425 gpu.module @gpu_funcs {
426 // expected-error @+1 {{'gpu.func' op expected at least 5 arguments to body region}}
427 "gpu.func"() ( {
429 "gpu.return"() : () -> ()
430 …} ) {gpu.kernel, sym_name = "kernel_1", type = (f32, memref<?xf32>) -> (), workgroup_attributions …
438 %t = gpu.wait
444 // expected-error @+1 {{custom op 'gpu.wait' needs to be named when marked 'async'}}
445 gpu.wait async