-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improve resizing log message #1939
base: main
Are you sure you want to change the base?
Conversation
@@ -214,3 +215,34 @@ impl<'a, T: FieldElement> MachineParts<'a, T> { | |||
self.fixed_data.column_name(poly_id) | |||
} | |||
} | |||
|
|||
/// The minimum size for which a warning is logged if the used rows are less than half of the size. | |||
/// This number coincides with 2**powdr_linker::MIN_DEGREE_LOG. |
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.
It doesn't because there is no static_assert.
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.
Is it important that it does?
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.
It is not really important. If the total number of rows, the overhead of proving them becomes negligible and the log would just be noise. Arguably 32 is a already very small.
If this number was below 2**powdr_linker::MIN_DEGREE_LOG
, we'd get the log message often, that's why I chose it to be equal.
Yesterday, we also discussed with Thibaut and Leo that we want to remove MIN_DEGREE_LOG
and let the user always be explicit about the min degree. Then, this comment goes away.
executor/src/witgen/machines/mod.rs
Outdated
"Only {} / {} rows are used in machine {}, which is configured to support sizes in the range {}..{}. If the backend supports it, consider lowering the min_degree.", | ||
used_rows, | ||
size, | ||
name, | ||
degree_range.min, | ||
degree_range.max, |
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.
"Only {} / {} rows are used in machine {}, which is configured to support sizes in the range {}..{}. If the backend supports it, consider lowering the min_degree.", | |
used_rows, | |
size, | |
name, | |
degree_range.min, | |
degree_range.max, | |
"Only {used_rows} of {size} rows are used in machine '{name}', which is configured to support sizes in the range {degree_range}. If the backend supports it, consider lowering the min_degree.", |
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.
I think we should also say what the actual probleme here is. I'm not sure, but I guess that the machine could be sized down, but min_degree
prevents the size being reduced?
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.
OK, added that! Also logging the percentage now and mention that the goal should be to be at least at 50%.
Co-authored-by: chriseth <chris@ethereum.org>
With this change, we check the fraction of used rows in each machine. If the fraction is above 50%, we don't log anything in INFO level, otherwise, we suggest that the machines could be configured with a smaller min_degree.
This is not a warning, because on some backends, it might not be possible to use VADCOP.
Example: