comparison mlir/test/Conversion/GPUCommon/lower-wait-to-gpu-runtime-calls.mlir @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children c4bab56944e8
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 // RUN: mlir-opt %s --gpu-to-llvm | FileCheck %s
2
3 module attributes {gpu.container_module} {
4
5 func @foo() {
6 // CHECK: %[[t0:.*]] = llvm.call @mgpuStreamCreate
7 // CHECK: %[[e0:.*]] = llvm.call @mgpuEventCreate
8 // CHECK: llvm.call @mgpuEventRecord(%[[e0]], %[[t0]])
9 %t0 = gpu.wait async
10 // CHECK: %[[t1:.*]] = llvm.call @mgpuStreamCreate
11 // CHECK: llvm.call @mgpuStreamWaitEvent(%[[t1]], %[[e0]])
12 // CHECK: llvm.call @mgpuEventDestroy(%[[e0]])
13 %t1 = gpu.wait async [%t0]
14 // CHECK: llvm.call @mgpuStreamSynchronize(%[[t0]])
15 // CHECK: llvm.call @mgpuStreamDestroy(%[[t0]])
16 // CHECK: llvm.call @mgpuStreamSynchronize(%[[t1]])
17 // CHECK: llvm.call @mgpuStreamDestroy(%[[t1]])
18 gpu.wait [%t0, %t1]
19 return
20 }
21 }