Open ArunaKote opened 3 years ago
@jaeyounkim,
1.tensorflow version 2.7.0-dev20210831
2.tensorflow/bazel-bin/tensorflow/compiler/mlir/tf-opt --version LLVM (http://llvm.org/): LLVM version 14.0.0git Optimized build. Default target: x86_64-unknown-linux-gnu Host CPU: cascadelake 3.tensorflow/bazel-bin/tensorflow/compiler/mlir/tf-mlir-translate --version LLVM (http://llvm.org/): LLVM version 14.0.0git Optimized build. Default target: x86_64-unknown-linux-gnu Host CPU: cascadelake
I am using tf 2.7.0-dev20210831. I am using https://tfhub.dev/tensorflow/mask_rcnn/inception_resnet_v2_1024x1024/1” and creating tf dialect using tf.mlir.experimental.convert_graph_def. I have attached python code which I used to get tf dialect.
Then I used tensorflow/bazel-bin/tensorflow/compiler/mlir/tf-opt -canonicalize --tf-shape-inference -xla-legalize-tf --print-ir-before-all &>1 tf.mlir
Got Error as:
ex_13_09.mlir:3:3: error: The following operations cannot be legalized: tf.Const (count: 1); tf.CropAndResize (count: 2); tf.NonMaxSuppressionV5 (count: 91); tf.Placeholder (count: 1); tf.ResizeBilinear (count: 1); tf.Squeeze (count: 4); tf.TopKV2 (count: 4); tf.Where (count: 3). These legalization failure(s) may be due to missing TF to HLO lowerings and/or unsupported attributes, etc. builtin.func @main() { ^ ex_13_09.mlir:3:3: error: Emitting more detail about one op that failed to legalize... builtin.func @main() { ^ ex_13_09.mlir:289:16: error: 'tf.Const' op is not legalizable %cst_284 = "tf.Const"() {value = dense<"Incorrect field size: actual vs expected."> : tensor<!tf_type.string>} : () -> tensor<!tf_type.string> ^ ex_13_09.mlir:289:16: note: see current operation: %704 = "tf.Const"() {value = dense<"Incorrect field size: actual vs expected."> : tensor<!tf_type.string>} : () -> tensor<!tf_type.string>
python_code.zip