Skip to content

feat: support selective tensor dump by task#844

Open
zmnobug wants to merge 1 commit into
hw-native-sys:mainfrom
zmnobug:feature/838-partial-task-tensor-dump
Open

feat: support selective tensor dump by task#844
zmnobug wants to merge 1 commit into
hw-native-sys:mainfrom
zmnobug:feature/838-partial-task-tensor-dump

Conversation

@zmnobug
Copy link
Copy Markdown

@zmnobug zmnobug commented May 22, 2026

Summary

  • Add rt_tensor_dump_selective() to enable task-selective tensor dump mode.
  • Add Arg::dump_input(), dump_output(), and dump_input_output() and carry the request through task payloads and dump records.
  • Filter unmarked tasks at the AICPU tensor dump collection entry while preserving legacy full-dump behavior by default.
  • Add a partial tensor dump regression test and update tensor dump documentation.

Testing

  • a2a3sim build
  • a5sim build
  • a2a3 onboard build
  • TestTensorDump::default --dump-tensor
  • TestTensorDumpPartial::default --dump-tensor

Fixes #838

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a selective tensor dump feature, allowing users to dump inputs and outputs for specific tasks by enabling a selective mode and marking individual tasks. The implementation adds bitmask-based request flags to task metadata and updates the AICPU collection logic to filter tasks accordingly. Review feedback suggests adding defensive null checks for the runtime context in the orchestration API to prevent potential crashes and using bitwise OR assignment for consistency in setting dump requests to avoid accidentally clearing flags.

Comment thread src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_types.h Outdated
Comment thread src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_types.h Outdated
- add rt_tensor_dump_selective() to enable selective dump mode
- add Arg::dump_input(), dump_output(), and dump_input_output()
- carry dump requests through task payload and dump records
- filter unmarked tasks at AICPU tensor dump collection entry
- keep legacy full tensor dump behavior when selective mode is not enabled
- add partial tensor dump test and update docs
@zmnobug zmnobug force-pushed the feature/838-partial-task-tensor-dump branch from 0dab2f6 to b76483f Compare May 22, 2026 06:09
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.

[Feature] Support partial task selection for tensor dump

1 participant