From fab23e66501d1a404af206aa4db4d1859a531bce Mon Sep 17 00:00:00 2001 From: zhanghb97 Date: Sun, 24 Nov 2024 19:50:31 +0000 Subject: [PATCH] [examples] Update next-rope examples. --- examples/BuddyNext/next-rope.mlir | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/BuddyNext/next-rope.mlir b/examples/BuddyNext/next-rope.mlir index 747a6d1e7..12f42de7f 100644 --- a/examples/BuddyNext/next-rope.mlir +++ b/examples/BuddyNext/next-rope.mlir @@ -133,8 +133,30 @@ func.func @kernel(%arg0 : tensor<1x40x4096xf32>, %arg1 : tensor<1x40x4096xf32>, // CHECK-SAME: [ // CHECK-SAME: [-3{{(, [-]?3)*}}], + %tensor_unranked_1 = tensor.cast %84 : tensor<1x32x40x128xf32> to tensor<*xf32> + + // All the elements of the MemRef are the same, + // only check the first line to verify the correctness. + // CHECK: Unranked Memref base@ = {{.*}} rank = 4 offset = 0 sizes = [1, 32, 40, 128] strides = [163840, 5120, 128, 1] data = + // CHECK-NEXT: [ + // CHECK-SAME: [ + // CHECK-SAME: [ + // CHECK-SAME: [-2{{(, -2)*}}{{(, 22)*}}], + + %tensor_unranked_2 = tensor.cast %85 : tensor<1x32x40x128xf32> to tensor<*xf32> + + // All the elements of the MemRef are the same, + // only check the first line to verify the correctness. + // CHECK: Unranked Memref base@ = {{.*}} rank = 4 offset = 0 sizes = [1, 32, 40, 128] strides = [163840, 5120, 128, 1] data = + // CHECK-NEXT: [ + // CHECK-SAME: [ + // CHECK-SAME: [ + // CHECK-SAME: [15{{(, 15)*}}], + // Print results. call @printMemrefF32(%tensor_unranked) : (tensor<*xf32>) -> () + call @printMemrefF32(%tensor_unranked_1) : (tensor<*xf32>) -> () + call @printMemrefF32(%tensor_unranked_2) : (tensor<*xf32>) -> () // Print timings. vector.print %time : f64