[Mlir-commits] [mlir] 647db57 - [mlir][openacc][NFC] Add missing check lines for acc.update tests

Valentin Clement llvmlistbot at llvm.org
Wed May 10 08:24:33 PDT 2023


Author: Valentin Clement
Date: 2023-05-10T08:24:28-07:00
New Revision: 647db57cdd08b7c3a01e22b0d4d31c4d116ab07e

URL: https://github.com/llvm/llvm-project/commit/647db57cdd08b7c3a01e22b0d4d31c4d116ab07e
DIFF: https://github.com/llvm/llvm-project/commit/647db57cdd08b7c3a01e22b0d4d31c4d116ab07e.diff

LOG: [mlir][openacc][NFC] Add missing check lines for acc.update tests

D149909 was missing the check lines in the ops.mlir lit test.

Reviewed By: vzakhari

Differential Revision: https://reviews.llvm.org/D150232

Added: 
    

Modified: 
    mlir/test/Dialect/OpenACC/ops.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Dialect/OpenACC/ops.mlir b/mlir/test/Dialect/OpenACC/ops.mlir
index 42e0bda734c61..b31be94b0da48 100644
--- a/mlir/test/Dialect/OpenACC/ops.mlir
+++ b/mlir/test/Dialect/OpenACC/ops.mlir
@@ -1305,12 +1305,20 @@ func.func @testunstructuredclauseops(%a: memref<10xf32>) -> () {
 
 // -----
 
-func.func @host_device_ops(%a: memref<10xf32>) -> () {
-  %devptr = acc.getdeviceptr varPtr(%a : memref<10xf32>) -> memref<10xf32> {dataClause = 16}
-  acc.update_host accPtr(%devptr : memref<10xf32>) to varPtr(%a : memref<10xf32>) {structured = false}
-  acc.update dataOperands(%devptr : memref<10xf32>)
+func.func @host_device_ops(%a: memref<f32>) -> () {
+  %devptr = acc.getdeviceptr varPtr(%a : memref<f32>) -> memref<f32> {dataClause = 16}
+  acc.update_host accPtr(%devptr : memref<f32>) to varPtr(%a : memref<f32>) {structured = false}
+  acc.update dataOperands(%devptr : memref<f32>)
 
-  %accPtr = acc.update_device varPtr(%a : memref<10xf32>) -> memref<10xf32>
-  acc.update dataOperands(%accPtr : memref<10xf32>)
+  %accPtr = acc.update_device varPtr(%a : memref<f32>) -> memref<f32>
+  acc.update dataOperands(%accPtr : memref<f32>)
   return
 }
+
+// CHECK-LABEL: func.func @host_device_ops(
+// CHECK-SAME:    %[[A:.*]]: memref<f32>)
+// CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[A]] : memref<f32>)   -> memref<f32>
+// CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : memref<f32>) to varPtr(%[[A]] : memref<f32>) {structured = false}
+// CHECK: acc.update dataOperands(%[[DEVPTR_A]] : memref<f32>)
+// CHECK: %[[DEVPTR_A:.*]] = acc.update_device varPtr(%[[A]] : memref<f32>)   -> memref<f32>
+// CHECK: acc.update dataOperands(%[[DEVPTR_A]] : memref<f32>)


        


More information about the Mlir-commits mailing list