Skip to content

Conversation

@kaim-eng
Copy link

@kaim-eng kaim-eng commented Dec 4, 2025

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.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 4, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kaim-eng kaim-eng changed the title New 104 feat: add power estimation Dec 4, 2025
@github-actions github-actions bot added the feat label Dec 4, 2025
@kaim-eng kaim-eng force-pushed the new-104 branch 2 times, most recently from 4e3bc8f to ae43171 Compare December 4, 2025 16:38
- 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]>
self._scale_factor = scale_factor

def query(self, database: PerfDatabase, **kwargs):
def query(self, database: PerfDatabase, **kwargs) -> float:
Copy link
Contributor

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

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants