This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][SPIRV] Create new ctx for deserialization in roundtrips.
ClosedPublic

Authored by ergawy on Sep 15 2020, 7:35 AM.

Details

Summary

Roundtripping SPIR-V modules used the same MLIRContext object for both
ways of the trip. This resulted in deserialization using a context
object already containing Types constructed during serialization.
This commit rectifies that by creating a new MLIRContext during
deserialization.

Diff Detail

Event Timeline

ergawy created this revision.Sep 15 2020, 7:35 AM
ergawy requested review of this revision.Sep 15 2020, 7:35 AM

Failures seem totally unrelated.

mravishankar accepted this revision.Sep 18 2020, 6:31 AM

Thanks! It looks good to me, but I am not super familiar with the registration stuff, but looks fine overall.

@mehdi_amini PTAL.

This revision is now accepted and ready to land.Sep 18 2020, 6:31 AM
ergawy added a comment.EditedSep 18 2020, 7:03 AM

Thanks @mravishankar for the approval. If there are no doubts about the registration part can you please commit on my behalf? I don't have commit access.

antiagainst accepted this revision.Sep 18 2020, 8:45 AM

Looks good to me. Thanks for fixing this!