// RUN: infrtopt --pd-op-fuse %s | FileCheck %s // CHECK-LABEL: @main func @main(%arg0: tensor, %arg1: tensor, %arg2:tensor, %arg3:tensor, %arg4:tensor, %arg5:tensor, %arg6:tensor) -> tensor { // CHECK: %0 = "pd.FC"(%arg0, %arg1, %arg4) {in_num_col_dims = 1 : i32} : (tensor, tensor, tensor) -> tensor %c = "pd.matmul_v2"(%arg0, %arg1) {transpose_y=false} : (tensor, tensor) -> tensor %d = "pd.elementwise_add"(%c, %arg4) {axis=1:si32} : (tensor, tensor) -> tensor %e = "pd.relu6"(%d) {} : (tensor) -> tensor // CHECK: %2 = "pd.FC"(%1, %arg2, %arg5) {in_num_col_dims = 1 : i32} : (tensor, tensor, tensor) -> tensor %c1 = "pd.matmul_v2"(%e, %arg2) {transpose_x=false, transpose_y=false} : (tensor, tensor) -> tensor %d1 = "pd.elementwise_add"(%c1, %arg5) {axis=1:si32} : (tensor, tensor) -> tensor %e1 = "pd.relu"(%d1) {} : (tensor) -> tensor // CHECK: %4 = "pd.FC"(%3, %arg3, %arg6) {in_num_col_dims = 1 : i32} : (tensor, tensor, tensor) -> tensor %c2 = "pd.matmul_v2"(%e1, %arg3) {transpose_x=true, transpose_y=false} : (tensor, tensor) -> tensor %d2 = "pd.elementwise_add"(%c2, %arg6) {axis=1:si32} : (tensor, tensor) -> tensor %e2 = "pd.relu"(%d2) {} : (tensor) -> tensor infrt.return %e2:tensor }