Repository navigation
Arm backend: Write PMU metrics to etdump if available - #24507
Merged
Merged
Conversation
This is done as soon as ethosu_execution_stats is linked, was built with ET_EVENT_TRACER_ENABLED, and a tracer is available. No EthosUStatsBuffer registration is neccessary. The metrics are written as a profile_event with delegate_debug_id_str = "ethosu.pmu.counters", and delegate_debug_metadata binary blob described in EthosUExecutionStats.h. The blob begins with `EUC1` (EthosU Counters), where 1 is a versioning number. For consuming the metrics, backends/arm/ethosu/parse_delegate_metadata.py is added that provides parse_pmu_profile_event() -> EthosUPmuProfileEvent, that parsers the blob into a typed dataclass, and parse_ethosu_delegate_pmu_metadata() -> dict that can be passed to the delegate_metadata_parser argument of Inspector. Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: Ib952e2530b23e847aa19aff4d4f0ae093a2bf3e1
Erik-Lundell
requested review from
digantdesai,
larryliu0820 and
rascani
as code owners
November 3, 2026 16:20
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24507
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit a3cb696 with merge base a489dca ( BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Sebastian-Larsson
approved these changes
Nov 3, 2026
zingo
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is done as soon as ethosu_execution_stats is linked, was built with ET_EVENT_TRACER_ENABLED, and a tracer is available.
No EthosUStatsBuffer registration is neccessary.
The metrics are written as a profile_event with
delegate_debug_id_str = "ethosu.pmu.counters", and delegate_debug_metadata binary blob described in
EthosUExecutionStats.h. The blob begins with
EUC1(EthosU Counters), where 1 is a versioning number.For consuming the metrics,
backends/arm/ethosu/parse_delegate_metadata.py
is added that provides
parse_pmu_profile_event() -> EthosUPmuProfileEvent, that parsers the blob into a typed dataclass, and
parse_ethosu_delegate_pmu_metadata() -> dict
that can be passed to the delegate_metadata_parser argument of Inspector.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani