|
| 1 | +// RUN: enzymexlamlir-opt %s --enzyme-hlo-opt --split-input-file | FileCheck %s |
| 2 | + |
| 3 | +module { |
| 4 | + func.func @fuse(%op: tensor<4x1x8x8xcomplex<f32>>, %19: tensor<4x1x4x8xcomplex<f32>>, %22: tensor<4x1x4x8xcomplex<f32>>) -> tensor<4x1x8x8xcomplex<f32>> { |
| 5 | + %c_7 = stablehlo.constant dense<4> : tensor<i32> |
| 6 | + %c_6 = stablehlo.constant dense<0> : tensor<i32> |
| 7 | + %23 = stablehlo.dynamic_update_slice %op, %19, %c_6, %c_6, %c_6, %c_6 : (tensor<4x1x8x8xcomplex<f32>>, tensor<4x1x4x8xcomplex<f32>>, tensor<i32>, tensor<i32>, tensor<i32>, tensor<i32>) -> tensor<4x1x8x8xcomplex<f32>> |
| 8 | + %26 = stablehlo.dynamic_update_slice %23, %22, %c_6, %c_6, %c_6, %c_7 : (tensor<4x1x8x8xcomplex<f32>>, tensor<4x1x4x8xcomplex<f32>>, tensor<i32>, tensor<i32>, tensor<i32>, tensor<i32>) -> tensor<4x1x8x8xcomplex<f32>> |
| 9 | + func.return %26: tensor<4x1x8x8xcomplex<f32>> |
| 10 | + } |
| 11 | +} |
| 12 | + |
| 13 | +// CHECK: func.func @fuse(%arg0: tensor<4x1x8x8xcomplex<f32>>, %arg1: tensor<4x1x4x8xcomplex<f32>>, %arg2: tensor<4x1x4x8xcomplex<f32>>) -> tensor<4x1x8x8xcomplex<f32>> { |
| 14 | +// CHECK-NEXT: %c = stablehlo.constant dense<4> : tensor<i32> |
| 15 | +// CHECK-NEXT: %c_0 = stablehlo.constant dense<0> : tensor<i32> |
| 16 | +// CHECK-NEXT: %0 = stablehlo.slice %arg0 [0:4, 0:1, 4:8, 0:8] : (tensor<4x1x8x8xcomplex<f32>>) -> tensor<4x1x4x8xcomplex<f32>> |
| 17 | +// CHECK-NEXT: %1 = stablehlo.dynamic_update_slice %arg1, %arg2, %c_0, %c_0, %c_0, %c : (tensor<4x1x4x8xcomplex<f32>>, tensor<4x1x4x8xcomplex<f32>>, tensor<i32>, tensor<i32>, tensor<i32>, tensor<i32>) -> tensor<4x1x4x8xcomplex<f32>> |
| 18 | +// CHECK-NEXT: %2 = stablehlo.concatenate %1, %0, dim = 2 : (tensor<4x1x4x8xcomplex<f32>>, tensor<4x1x4x8xcomplex<f32>>) -> tensor<4x1x8x8xcomplex<f32>> |
| 19 | +// CHECK-NEXT: return %2 : tensor<4x1x8x8xcomplex<f32>> |
| 20 | +// CHECK-NEXT: } |
0 commit comments