Add: opt-in CHIP_TIMING run_prepared() wall-clock breakdown#5
Open
ChaoZheng109 wants to merge 1 commit into
Open
Add: opt-in CHIP_TIMING run_prepared() wall-clock breakdown#5ChaoZheng109 wants to merge 1 commit into
ChaoZheng109 wants to merge 1 commit into
Conversation
Break a single run_prepared() into per-stage host and device durations, reconciled against the existing host_wall_ns / device_wall_ns numbers (issue hw-native-sys#1012), without intrusive KernelArgs or scheduler changes. - Host: emit [CHIP_TIMING] B/E spans around the run_prepared stages (attach, bind_callable, bind_impl, runner_run, validate) plus the envelope and the host_wall / device_wall baselines, on the V4 log tier (off at the default V5 threshold). c_api_shared.cpp onboard+sim. - Device: stamp aicpu_wall / aicpu_exec boundaries from get_sys_cnt in the onboard AICPU kernel (a5, a2a3); sim mirrors them in its in-process device_runner execution loop. - The timestamp rides in the message body (ns), independent of the log prefix, matching tools/benchmark_rounds.sh's device-log convention. - Add simpler_setup/tools/chip_timing.py: parse the logs into an indented per-run tree, reconciled against the wall baselines. - Add tests/ut/py/test_chip_timing.py and docs/dfx/chip-timing.md. Verified: a2a3 + a5 sim examples reconcile exactly; disabled at the default level emits no lines; 22 unit tests pass.
ec94445 to
b68d6d8
Compare
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.
Break a single run_prepared() into per-stage host and device durations, reconciled against the existing host_wall_ns / device_wall_ns numbers (issue hw-native-sys#1012), without intrusive KernelArgs or scheduler changes.
Verified: a2a3 + a5 sim examples reconcile exactly; disabled at the default level emits no lines; 22 unit tests pass.