-
Notifications
You must be signed in to change notification settings - Fork 603
Enable function specialization. #7720
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c71e53c
to
0effd96
Compare
39449b8
to
1d20c3d
Compare
1d20c3d
to
5b3bca2
Compare
0effd96
to
2ca9e71
Compare
2ca9e71
to
9cac382
Compare
5b3bca2
to
3bc81a1
Compare
3bc81a1
to
bbc787a
Compare
bbc787a
to
d68cf72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 50 files at r2, all commit messages.
Reviewable status: 3 of 50 files reviewed, 2 unresolved discussions
crates/cairo-lang-lowering/src/db.rs
line 316 at r2 (raw file):
fn priv_should_inline(&self, function_id: ids::ConcreteFunctionWithBodyId) -> Maybe<bool>; // Internal query for a heuristic to decide if a given `function_id` should be specalized.
Suggestion:
/// Returns whether a function should be specalized.
crates/cairo-lang-lowering/src/db.rs
line 846 at r2 (raw file):
panic!("Expected a specialized function"); }; // The size is 8/10*orig_size > specialized_size of the original size.
Suggestion:
// The heuristic is that the size is 8/10*orig_size > specialized_size of the original size.
9b5ecd4
to
da8940b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 50 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-lowering/src/db.rs
line 316 at r2 (raw file):
fn priv_should_inline(&self, function_id: ids::ConcreteFunctionWithBodyId) -> Maybe<bool>; // Internal query for a heuristic to decide if a given `function_id` should be specalized.
Done.
crates/cairo-lang-lowering/src/db.rs
line 846 at r2 (raw file):
panic!("Expected a specialized function"); }; // The size is 8/10*orig_size > specialized_size of the original size.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 50 files at r2, 1 of 1 files at r3.
Reviewable status: 12 of 50 files reviewed, 1 unresolved discussion
crates/cairo-lang-lowering/src/optimizations/const_folding.rs
line 482 at r3 (raw file):
} fn try_specialize_call(
doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 38 of 50 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
da8940b
to
2ffc124
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-lowering/src/optimizations/const_folding.rs
line 485 at r4 (raw file):
/// Returns None if the call should not be specialized. /// /// Specialization of the with the same base is currently not supported, and specialization
Suggestion:
/// Specialization of the ?what? with the same base
2ffc124
to
3669526
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
3669526
to
8c0f1e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 49 of 50 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-lowering/src/optimizations/const_folding.rs
line 482 at r3 (raw file):
Previously, orizi wrote…
doc
Done.
crates/cairo-lang-lowering/src/optimizations/const_folding.rs
line 485 at r4 (raw file):
/// Returns None if the call should not be specialized. /// /// Specialization of the with the same base is currently not supported, and specialization
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
No description provided.