tensorflow / tensorflow/models
Error while converting mrcnn tf dialect to HLO
@rachellj218 is already working on this.
Since Sep 14, 2021.
- 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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.