// RUN: infrtexec -i %s module { func @main_graph(%arg0: !phi.dense_tensor_map, %arg1: !infrt.dense_tensor) -> !infrt.dense_tensor { %0 = phi_dt.tensor_map_get_tensor(%arg0) {name = "linear_0.w_0"} -> !infrt.dense_tensor %1 = phi_dt.tensor_map_get_tensor(%arg0) {name = "linear_0.b_0"} -> !infrt.dense_tensor %2 = "phi_dt.create_context.cpu"() : () -> !phi.context %5 = "phi_cpu.matmul.float32.any"(%2, %arg1, %0) {trans_x = false, trans_y = false} : (!phi.context, !infrt.dense_tensor, !infrt.dense_tensor) -> !infrt.dense_tensor %7 = "phi_cpu.add.float32.any"(%2, %5, %1): (!phi.context, !infrt.dense_tensor, !infrt.dense_tensor) -> !infrt.dense_tensor infrt.return %7 : !infrt.dense_tensor } func @main() { %ctx = "phi_dt.create_context.cpu" (): () -> !phi.context %1 = "phi_dt.create_dense_tensor.cpu" (%ctx) {precision=#infrt.precision, layout=#infrt.layout, lod=[1:i64], dims=[16:i64, 784:i64]}: (!phi.context) -> (!infrt.dense_tensor) %map = phi_dt.load_combined_params(){model_path="@CMAKE_BINARY_DIR@/linear/linear.pdmodel",params_path="@CMAKE_BINARY_DIR@/linear/linear.pdiparams"} %2 = infrt.call@main_graph(%map, %1) : (!phi.dense_tensor_map, !infrt.dense_tensor) -> !infrt.dense_tensor phi_dt.print_tensor (%2 : !infrt.dense_tensor) infrt.return } }