tensorflow / tensorflow/models

Error while converting mrcnn tf dialect to HLO

Open
#10,256 1 comment 0 reactions 3 assignees View on GitHub

@rachellj218 is already working on this.

Since Sep 14, 2021.

models:research models:research:odapi type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.