Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stellaraccident opened this issue Jan 11, 2022 · 4 comments
Assignees

Comments

@stellaraccident
Copy link

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

@joker-eph
Copy link
Contributor

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

@joker-eph
Copy link
Contributor

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

@joker-eph
Copy link
Contributor

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

@stellaraccident
Copy link
Author

Thanks!

ArmageddonKnight pushed a commit to UofT-EcoSystem/tensorflow that referenced this issue Jan 19, 2022
…cal-scope=false

When printing without the local scope, the locations are printed at the end of
the file and refered to with aliases. When parsing back we don't have the
location at hand and instead the parser handled itself the remapping of the
location when parsing is done.
This use to crash and has been fixed in MLIR.

Fixes tensorflow/mlir-hlo#25

PiperOrigin-RevId: 422838347
Change-Id: Ief59f4fdb5bdc0ffa43d95611f3d1edeea38d97b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants