tensorflow/mlir-hlo

Custom assembly form for mhlo.reduce does not roundtrip with locations

stellaraccident opened this issue · 4 comments

Have not triaged yet, but the attached file fails to roundtrip some forms of the mhlo.reduce op with location info.

Example of failure:

%39 = mhlo.reduce(%38 init: %1) applies mhlo.maximum across dimensions = [1] : (tensor<?x10xf32>, tensor<f32>) -> tensor<?xf32> loc(#loc1)

Reports: "expected location instance"

Repro:

mhlo-opt input.mlir

reduce_parse_error.mlir.txt

I changed the syntax recently so that's likely on me, I'll try to look into this.

I can't repro with milo-opt because reduce_parse_error.mlir.txt:3:3: error: custom op 'iree_input.global' is unknown and I can't repro with iree-opt because error: #"tf_type"<"shape<?x784>"> : 'none' attribute created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR opt tool used

Actually -allow-unregistered-dialect with tree-opt should do the trick...

Thanks!