xref: /aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/tfrt/tests/saved_model/testdata/test.mlir (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1module attributes {tf.versions = {bad_consumers = [], min_consumer = 0 : i32, producer = 398 : i32}, tf_saved_model.semantics} {
2  "tf_saved_model.global_tensor"() {is_mutable, sym_name = "y", type = tensor<3x1xi32>, value = dense<[[1], [2], [3]]> : tensor<3x1xi32>} : () -> ()
3  "tf_saved_model.asset"() {sym_name = "z", filename = "file"} : () -> ()
4  func.func @serving_default(
5      %arg0: tensor<1x3xi32> {tf_saved_model.index_path = ["x"]},
6      %arg1: tensor<!tf_type.resource<tensor<3x1xi32>>> {tf_saved_model.bound_input = @y},
7      %arg2: tensor<!tf_type.string> {tf_saved_model.bound_input = @z}
8    ) -> (tensor<1x1xi32> {tf_saved_model.index_path = ["r"]})
9      attributes {
10        tf.entry_function = {control_outputs = "", inputs = "input:0", outputs = "result:0"},
11        tf_saved_model.exported_names = ["serving_default"]
12    }
13  {
14    %0 = "tf.ReadVariableOp"(%arg1) {device = ""} : (tensor<!tf_type.resource<tensor<3x1xi32>>>) -> tensor<3x1xi32>
15    %1 = "tf.MatMul"(%arg0, %0) {device = "", transpose_a = false, transpose_b = false} : (tensor<1x3xi32>, tensor<3x1xi32>) -> tensor<1x1xi32>
16    func.return %1 : tensor<1x1xi32>
17  }
18  func.func @predict(
19    ) -> (tensor<0x!tf_type.string> {tf_saved_model.index_path = ["r"]})
20      attributes {
21        tf.entry_function = {control_outputs = "", inputs = "input:0", outputs = "result:0"},
22        tf_saved_model.exported_names = ["predict"]
23    }
24  {
25    %0 = "tf.Const"() {dtype = !tf_type.string, value = dense<[]> : tensor<0x!tf_type.string>} : () -> tensor<0x!tf_type.string>
26    func.return %0 : tensor<0x!tf_type.string>
27  }
28}
29