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

Also include the backend IR files in the ir-generated library file. #3985

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Apr 19, 2023

Hopefully fixes #3984.

@fruffy
Copy link
Collaborator Author

fruffy commented Apr 19, 2023

There seems to be some non-determinism in the p4c-bm2 json serialization (or json loading?) for Ubuntu 18. Not quite sure what could cause that. Maybe it is using unordered maps?

Edit: Protobuf maps do not necessarily preserve ordering. Could that be the reason?
https://protobuf.dev/programming-guides/proto3/#maps

@fruffy fruffy force-pushed the fruffy/build_fixes branch from b1fab14 to b9d6daa Compare April 19, 2023 17:39
@antoninbas
Copy link
Member

There seems to be some non-determinism in the p4c-bm2 json serialization (or json loading?) for Ubuntu 18. Not quite sure what could cause that. Maybe it is using unordered maps?

Edit: Protobuf maps do not necessarily preserve ordering. Could that be the reason? https://protobuf.dev/programming-guides/proto3/#maps

I don't think the tests in load_ir_from_json.cpp have anything to do with Protobuf. That's IR serialization.

@fruffy
Copy link
Collaborator Author

fruffy commented Apr 19, 2023

I don't think the tests in load_ir_from_json.cpp have anything to do with Protobuf. That's IR serialization.

Ah, for some reason I assumed the JSON generated by p4c-bm2-ss is generated using protobuf. But the back end has its own serializer. Makes it even more confusing.

@fruffy fruffy force-pushed the fruffy/build_fixes branch from 1509a17 to 4fda0d1 Compare April 20, 2023 16:40
@fruffy fruffy marked this pull request as ready for review April 20, 2023 18:01
@fruffy
Copy link
Collaborator Author

fruffy commented Apr 20, 2023

Turns out ConvertEnums::EnumMapping was not an ordered_map and did not preserve insertion order.

Copy link
Member

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the build issue

@fruffy
Copy link
Collaborator Author

fruffy commented Apr 20, 2023

@mbudiu-vmw @jnfoster @pkotikal Could you rubberstamp this? The PR fixes a build problem, but is blocked because of the codeowners restriction.

Copy link
Contributor

@jnfoster jnfoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubberstamp'd.

@fruffy fruffy merged commit d3fd173 into main Apr 20, 2023
@fruffy
Copy link
Collaborator Author

fruffy commented Apr 20, 2023

Thanks!

@fruffy fruffy deleted the fruffy/build_fixes branch April 20, 2023 20:10
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

Successfully merging this pull request may close these issues.

Broken p4c build because of recent change
3 participants