Fixes to benchmark test code due to missing updates in dependency methods#1035
Open
kenya-sk wants to merge 5 commits intotensorflow:masterfrom
Open
Fixes to benchmark test code due to missing updates in dependency methods#1035kenya-sk wants to merge 5 commits intotensorflow:masterfrom
kenya-sk wants to merge 5 commits intotensorflow:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the benchmarking infrastructure by refining build dependencies, optimizing tensor conversions in gradient benchmarks, and implementing a custom random circuit generator. The changes include converting symbol_names to a TensorFlow tensor to avoid repeated conversions during benchmarking and replacing a library-dependent circuit generator with a manual implementation. Feedback suggests simplifying the redundant logic for determining circuit interaction orientation and improving the connectivity of the generated random circuits to ensure they are more representative for benchmarking purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes benchmark breakages in
benchmarks/scriptsand restores Bazel test coverage for the benchmark targets.Changes
benchmarks/scripts/BUILDand maderandom_clifford_circuitimportable by switching to py_library inbenchmarks/scripts/models/BUILD.benchmark_op_gradients.pyby passing symbol_names as a tensor.benchmark_random_circuit.pywith an in-file implementation based on ReCirq’sgoogle_v2_beyond_classical.pylogic (with source attribution), while preserving existing benchmark behavior (fixed-depth output).Note
Direct ReCirq adoption was intentionally deferred in this PR because it introduces a broader dependency migration than needed for a benchmark-fix change. In this repo, adding ReCirq as a required dependency impacts Python lockfile resolution and Bazel external dependency wiring, and we hit dependency-resolution conflicts while trying to make it mandatory. To keep this PR focused, low-risk, and test-stable, we inlined the minimal circuit-generation logic with source attribution, and left full ReCirq integration as follow-up work once dependency constraints are aligned.
Results
All benchmark tests have passed.