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

Another step toward full unrolling of loops: cache extracted body #131

Merged
merged 11 commits into from
Jul 10, 2024

Conversation

tim-hoffman
Copy link

No description provided.

@tim-hoffman tim-hoffman requested review from iangneal and 0xddom July 8, 2024 20:40
Comment on lines +167 to +168
/// Exists only to stabilize function order for lit test output.
func_creation_order: RefCell<Vec<String>>,
Copy link
Author

Choose a reason for hiding this comment

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

If we care about the performance impact of this, we would need to add a cmd line flag for lit testing I think.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would measure first before jumping into tweaking performance but if so I would guard the ordering code into a compile flag, debug builds is sorted, release builds not necessarily. Vanguard is going to use the release builds to we get both benefits

Copy link
Author

Choose a reason for hiding this comment

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

I had considered using debug build flag but I think the GitHub CI runs a release build so there would be intermittent failures here.
Excerpt from the CI log:


circom-unknown> Running phase: configurePhase
circom-unknown> [naersk] cargo_version (read): 1.74.0
circom-unknown> [naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
circom-unknown> [naersk] cargo_release: --release
circom-unknown> [naersk] cargo_options:
circom-unknown> [naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
circom-unknown> [naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
...
circom-unknown> Running phase: buildPhase
circom-unknown> cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
...
circom-unknown> buildPhase completed in 1 minutes 35 seconds
circom-unknown> Running phase: checkPhase
circom-unknown> cargo test $cargo_release -j "$NIX_BUILD_CORES"

Copy link
Collaborator

Choose a reason for hiding this comment

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

We could go back to a manual CI script then, to get more control. I honestly don't like leaving nix handle everything

@tim-hoffman tim-hoffman requested a review from iangneal July 9, 2024 04:12
Copy link
Collaborator

@0xddom 0xddom left a comment

Choose a reason for hiding this comment

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

Just some code organization thoughts

Comment on lines +167 to +168
/// Exists only to stabilize function order for lit test output.
func_creation_order: RefCell<Vec<String>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would measure first before jumping into tweaking performance but if so I would guard the ordering code into a compile flag, debug builds is sorted, release builds not necessarily. Vanguard is going to use the release builds to we get both benefits

circuit_passes/src/passes/loop_unroll/body_extractor.rs Outdated Show resolved Hide resolved
Copy link

@iangneal iangneal left a comment

Choose a reason for hiding this comment

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

LGTM, other than Daniel's requests.

Copy link
Collaborator

@0xddom 0xddom left a comment

Choose a reason for hiding this comment

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

We gucci

@tim-hoffman tim-hoffman merged commit bb24637 into llvm Jul 10, 2024
4 checks passed
@tim-hoffman tim-hoffman deleted the th/cache_extracted_body branch July 10, 2024 13: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.

3 participants