Support: per-task tensor dump across all runtimes (#dump-tensor)#547
Merged
ChaoWao merged 1 commit intohw-native-sys:mainfrom Apr 15, 2026
Merged
Support: per-task tensor dump across all runtimes (#dump-tensor)#547ChaoWao merged 1 commit intohw-native-sys:mainfrom
ChaoWao merged 1 commit intohw-native-sys:mainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
1e2bb81 to
7934011
Compare
Add opt-in runtime observability that captures per-task input/output
tensor bytes (before dispatch and after completion) and exports them
to outputs/tensor_dump_<timestamp>/ for offline inspection.
Architecture:
- a2a3 (primary): shared memory via halHostRegister + DumpMemoryManager
background thread for concurrent collection during execution
- a5 (temporary fallback): memcpy-based batch collect-after-sync,
pending a5 halHostRegister support
- Device-side structures (DumpSetupHeader, DumpBuffer, TensorDumpRecord,
circular arena) are binary-identical across both platforms
- dump_data_base flows through KernelArgs (not Runtime), matching
the profiling pattern
Runtime integration:
- host_build_graph: orchestration registers tensor metadata via
set_tensor_info_to_task() / add_task_with_tensor_info()
- aicpu_build_graph / tensormap_and_ringbuffer: metadata derived
from PTO2TaskPayload automatically, no orchestration change needed
- Gated by ChipCallConfig::enable_dump_tensor (--dump-tensor CLI);
zero allocation and zero code path cost when disabled
Artifacts:
- dump_tensor_example scene tests (a2a3 + a5)
- tools/dump_viewer.py for filtering and exporting to human-readable txt
- docs/tensor-dump.md design doc
7934011 to
43f2a75
Compare
ChaoWao
approved these changes
Apr 15, 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.
Add opt-in runtime observability that captures per-task input/output tensor bytes (before dispatch and after completion) and exports them to outputs/tensor_dump_/ for offline inspection.
Architecture:
Runtime integration:
Artifacts:
closes #506