-
Notifications
You must be signed in to change notification settings - Fork 36
feat: add power estimation #153
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
base: main
Are you sure you want to change the base?
Conversation
4e3bc8f to
ae43171
Compare
- Add PerformanceResult class: float-like object that carries both latency and power data - Add power_w column to all output DataFrames (ColumnsStatic, ColumnsAgg, ColumnsDisagg) - Extend PerfDatabase with query_*_with_power methods for power-aware queries - Update all backend classes to support power estimation queries - Modify operations to return PerformanceResult with power data - Update inference session/summary to track and aggregate power consumption - Extend CLI report tables to display power_w column in results - Maintain backward compatibility with legacy database formats (defaults to 0.0W) This feature enables power consumption estimation alongside performance metrics, allowing users to optimize for both throughput and power efficiency. Signed-off-by: Kai Ma <[email protected]>
- Fix line length violations by splitting long strings - Remove useless if-else condition in perf_database - Clean up whitespace and formatting issues - All ruff checks now pass Signed-off-by: Kai Ma <[email protected]>
Update test_data_loaders.py to check for dictionary format with 'latency' and 'power' keys instead of plain float values. This aligns tests with the power estimation feature changes to data loader functions. Signed-off-by: Kai Ma <[email protected]>
Update test_interpolation.py to handle both dictionary format (with 'latency' and 'power' keys) and legacy float format. This ensures backward compatibility while supporting the new power-aware data structure. Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
| self._scale_factor = scale_factor | ||
|
|
||
| def query(self, database: PerfDatabase, **kwargs): | ||
| def query(self, database: PerfDatabase, **kwargs) -> float: |
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.
for return, should we indicate PerformanceResult, or just float
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.
Yes. I thought about this for quite some time. Currently, we return Performance_Result to minimize the impact to existing code
src/aiconfigurator/sdk/performance_result.py
It currently default return to float unless we tell it to return both perf and power.
I will change this to Performance_Result to be accurate
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
Signed-off-by: Kai Ma <[email protected]>
This is a new start of previous PR104
#104
I've been trying to rebase the dev branch of 104 to main ToT for several days but going nowhere.
This PR is basically redo what we have for 104 but from 12/3 ToT.