Skip to content

tp: merge Wattson interconnect power into cpu_2d curves#5818

Draft
runpinglai-creator wants to merge 4 commits into
mainfrom
dev/runpinglai/deepidle
Draft

tp: merge Wattson interconnect power into cpu_2d curves#5818
runpinglai-creator wants to merge 4 commits into
mainfrom
dev/runpinglai/deepidle

Conversation

@runpinglai-creator
Copy link
Copy Markdown
Contributor

@runpinglai-creator runpinglai-creator commented May 12, 2026

Background: In wattson, suspend is always mixed up with deep idle, both modeled as using 0 power. A lot of wattson regressions are due to suspend, either suspending longer or shorter than expected. Either way, wattson should be able to differentiate between suspend vs deep idle.

This change introduces active baseline power modeling for the interconnect and system bus in Wattson. This power is modeled under a new interconnect column in cpu_2d.csv and integrated directly into the "DSU/SCU estimate"
track.

The interconnect baseline represents the public power overhead of the SOC whenever the system is awake (!suspended), keeping the power domain model unified and physically accurate.

@runpinglai-creator runpinglai-creator force-pushed the dev/runpinglai/deepidle branch 2 times, most recently from 310afb2 to 2627dc8 Compare May 12, 2026 17:53
@runpinglai-creator runpinglai-creator marked this pull request as ready for review May 12, 2026 18:18
@runpinglai-creator runpinglai-creator requested a review from a team as a code owner May 12, 2026 18:18
@runpinglai-creator runpinglai-creator marked this pull request as draft May 12, 2026 18:39
@runpinglai-creator runpinglai-creator force-pushed the dev/runpinglai/deepidle branch from 172cd45 to 0b4cf88 Compare May 13, 2026 06:58
@runpinglai-creator runpinglai-creator changed the title tp&ui: Add miscellaneous power estimate track in Wattson tp: merge Wattson interconnect power into cpu_2d curves May 13, 2026
@runpinglai-creator runpinglai-creator force-pushed the dev/runpinglai/deepidle branch from 0b4cf88 to a642bf5 Compare May 14, 2026 01:05
Comment thread src/trace_processor/perfetto_sql/stdlib/wattson/cpu/estimates.sql Outdated
+ iif(suspend.suspended = 1, 0, coalesce(base.interconnect_mw, 0)) AS dsu_scu_mw
FROM _w_independent_cpus_calc AS slices
JOIN _unique_estimates_mw AS base USING (config_hash)
LEFT JOIN _gapless_suspend_slices AS suspend
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is weird logic, why does it need to check for time window overlap?
And if we do need time window overlap, we should use interval_intersect!()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was because upstream tables didn't pass "suspend" state down here. So I had to check the suspend overlap here to determine whether it's suspended here. Now I've passed the "suspend" states from upstream tables. Is this the concern?

Integrate the interconnect baseline power directly into cpu_2d.csv
under a new interconnect column. This power represents the active
baseline of the interconnect/bus system and is present whenever the
system is awake (!suspended).

- Add interconnect column to cpu_2d schema in gen_wattson_curves.py.
- Register interconnect column in C++ plugin __intrinsic_wattson_curves_cpu_2d.
- Migrate Tensor G4 & G5 deep idle power data into cpu_2d.csv under
  the interconnect column. Other devices are updated with 0.

Bug: 338654268
Signed-off-by: Runping Lai <runpinglai@google.com>
@runpinglai-creator runpinglai-creator force-pushed the dev/runpinglai/deepidle branch from d732cdb to 94df7e0 Compare May 14, 2026 21:05
Extract interconnect curves from cpu_2d_raw and unconditionally look
up interconnect_mw for Policy 0. Join CPU estimates with suspend
slices for CPU 0, and add the interconnect baseline power to dsu_scu_mw
whenever the system is awake (!suspended).

Bug: 338654268
Test: UI test and TP test
Signed-off-by: Runping Lai <runpinglai@google.com>
As DSU estimation adds "interconnect" power into it, dsu power will behigher

Test: tools/diff_test_trace_processor.py
Bug: 338654268
Signed-off-by: Runping Lai <runpinglai@google.com>
@runpinglai-creator runpinglai-creator force-pushed the dev/runpinglai/deepidle branch from 94df7e0 to f7af353 Compare May 14, 2026 21:17
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.

2 participants