Skip to content

[XLS] When comparing TreeBitLocations, compare node ID rather than pointer #2233

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

copybara-service[bot]
Copy link

[XLS] When comparing TreeBitLocations, compare node ID rather than pointer

Do the same when caching BDD trees for each node in the node_locations_ cache in the BDD query engine.

This is generally both a correctness & a safety improvement. In this specific case, it was found as a fix for nondeterminism! Due to false matches when memory locations were reused for new Nodes, the BDD query engine's variable caches could nondeterministically match with an (no-longer-used) variable created for a deleted Node. This was safe, but resulted in effective changes to the variable order, which could cause the BDD to saturate in different places nondeterministically.

@copybara-service copybara-service bot force-pushed the test_761556944 branch 4 times, most recently from 6835a1b to a40e237 Compare May 21, 2025 22:02
…inter

Do the same when caching BDD trees for each node in the `node_locations_` cache in the BDD query engine.

This is generally both a correctness & a safety improvement. In this specific case, it was found as a fix for nondeterminism! Due to false matches when memory locations were reused for new Nodes, the BDD query engine's variable caches could nondeterministically match with an (no-longer-used) variable created for a deleted Node. This was safe, but resulted in effective changes to the variable order, which could cause the BDD to saturate in different places nondeterministically.

PiperOrigin-RevId: 761693685
@copybara-service copybara-service bot merged commit b1e48c4 into main May 21, 2025
@copybara-service copybara-service bot deleted the test_761556944 branch May 21, 2025 22:35
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.

1 participant