diff --git a/tensorflow/compiler/mlir/lite/flatbuffer_export.cc b/tensorflow/compiler/mlir/lite/flatbuffer_export.cc index b9a1c4737d3..4a72e40491f 100644 --- a/tensorflow/compiler/mlir/lite/flatbuffer_export.cc +++ b/tensorflow/compiler/mlir/lite/flatbuffer_export.cc @@ -1759,13 +1759,14 @@ Optional Translator::TranslateInternal() { std::string err; if (!failed_flex_ops_.empty()) err += - "Ops that can be supported by the flex runtime (enabled via setting " - "the -emit-select-tf-ops flag):\n" + + "Some ops are not supported by the native TFLite runtime, you can " + "enable TF kernels fallback using TF Select. See instructions: " + "https://www.tensorflow.org/lite/guide/ops_select" + failed_flex_ops_summary; if (!failed_custom_ops_.empty()) err += - "Ops that need custom implementation (enabled via setting the " - "-emit-custom-ops flag):\n" + + "Some ops in the model are custom ops, See instructions to implement " + "custom ops: https://www.tensorflow.org/lite/guide/ops_custom" + failed_custom_ops_summary; auto& failed_region = named_regions[first_failed_func]; diff --git a/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_custom.mlir b/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_custom.mlir index 1be7db1d69c..913e128e697 100644 --- a/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_custom.mlir +++ b/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_custom.mlir @@ -2,7 +2,7 @@ // CHECK: error: 'tf.MyCustomOp' op is neither a custom op nor a flex op // CHECK: error: failed while converting: 'main' -// CHECK: Ops that need custom implementation (enabled via setting the -emit-custom-ops flag): +// CHECK: Some ops in the model are custom ops, See instructions to implement // CHECK: tf.MyCustomOp {name = "MyCustomOp"} func @main(tensor<4xf32>) -> tensor<4xf32> { diff --git a/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_flex.mlir b/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_flex.mlir index e767dc0e686..8e36c5266ce 100644 --- a/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_flex.mlir +++ b/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/disable_flex.mlir @@ -2,7 +2,7 @@ // CHECK: error: 'tf.Div' op is neither a custom op nor a flex op // CHECK: error: failed while converting: 'main' -// CHECK: Ops that can be supported by the flex runtime (enabled via setting the -emit-select-tf-ops flag): +// CHECK: Some ops are not supported by the native TFLite runtime // CHECK: tf.Div {name = "div"} func @main(tensor<4xf32>) -> tensor<4xf32> {