Skip to content

[WIP] Update: rename TensorDump internals to ArgsDump#1270

Open
indigo1973 wants to merge 1 commit into
hw-native-sys:mainfrom
indigo1973:dump_0702
Open

[WIP] Update: rename TensorDump internals to ArgsDump#1270
indigo1973 wants to merge 1 commit into
hw-native-sys:mainfrom
indigo1973:dump_0702

Conversation

@indigo1973

@indigo1973 indigo1973 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Finishes the tensor-dump -> args-dump naming migration (issue #1252) by
renaming both the internal implementation and the remaining public and
example surfaces that the earlier passes (#1072, #1143) left untouched.

Internal implementation:

  • Rename args-dump C++ types, headers, helpers, and CMake source paths
    from TensorDump* to ArgsDump* (collector, AICPU helpers, platform
    headers, DumpArgsLevel, tensor_dump_.{h,cpp} -> args_dump_).

Public config field:

  • Rename CallConfig::enable_dump_tensor -> enable_dump_args across the
    C++ struct, the L3<->L2 wire codec (remote_wire.cpp and the Python
    remote_l3_protocol.py / worker.py decoders), the nanobind property,
    the host device_runner apply_call_config consumers, scene_test.py, the
    per_task_runtime_env example, and the chip-worker unit tests. The wire
    byte layout is unchanged (the field keeps its position); only the
    identifier is renamed. No compatibility alias is kept, so downstream
    callers (e.g. pypto) must migrate enable_dump_tensor -> enable_dump_args.

Example + docs:

  • Rename the host_build_graph dump_tensor example (a2a3 + a5) to
    dump_args: directory, test module, TestDumpTensorExample ->
    TestDumpArgsExample, dump_tensor_orch.cpp -> dump_args_orch.cpp, and
    build_dump_tensor_graph -> build_dump_args_graph (including the copy
    reused by the a5 prepared_callable test). Update the args-dump doc
    links accordingly.
  • The TensorInfo metadata API (TensorInfo, set_tensor_info_to_task,
    add_task_with_tensor_info, make_tensor_info_from_tensor_arg) is left
    as-is: it describes tensor shape metadata specifically, not the
    general per-arg dump, so its naming is accurate.

Also fix two stale comments the rename left behind: the "Dump tensor
state" block comment in the a5 aicpu_executor (-> "Args dump state", to
match the adjacent "args dump" wording) and the dump_args_init doc
comment that described threads as dumping "tensors" rather than args.

The tensor_dump.json negative assertions in test_args_dump.py are kept
on purpose: they guard that the legacy filename is never emitted.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82b2f92c-3f70-47a8-ad15-563c9a801975

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR renames the "tensor dump" subsystem to "args dump" throughout the codebase, updating types (TensorDumpRecordArgsDumpRecord, TensorDumpInfoArgsDumpInfo), enums, constants (PROFILING_FLAG_DUMP_TENSORPROFILING_FLAG_DUMP_ARGS), collector classes (TensorDumpCollectorArgsDumpCollector), functions, file references, build lists, and documentation across a2a3, a5, and shared platform code.

Changes

TensorDump to ArgsDump Rename

Layer / File(s) Summary
Shared args-dump contracts and headers
src/{a2a3,a5}/platform/include/common/args_dump.h, src/common/platform/include/aicpu/args_dump_aicpu.h, src/common/platform/include/host/args_dump_collector.h, related header comments
New ArgsDump* enums, records, masks, and collector class declarations replace TensorDump* equivalents; supporting comments updated across profiling-state, kernel_args, dep_gen, scope_stats, buffer_pool_manager, profiler_base, profiling_copy, spin_hint headers.
Shared AICPU/host implementations
src/common/platform/shared/aicpu/args_dump_aicpu.cpp, src/common/platform/shared/host/args_dump_collector.cpp, device_runner_base.{h,cpp} (onboard & sim)
Filtering/masking logic and ArgsDumpCollector implementation switch to args-dump types; runner base wiring toggles enable_dump_args_/set_dump_args_enabled.
Platform config and build lists (a2a3 & a5)
platform_config.h, aicore_profiling_state.h, CMakeLists.txt (onboard/sim)
PROFILING_FLAG_DUMP_TENSORPROFILING_FLAG_DUMP_ARGS; source lists swap tensor_dump_collector.cppargs_dump_collector.cpp.
AICPU kernel entrypoints
src/{a2a3,a5}/platform/onboard/aicpu/kernel.cpp
Includes and profiling-flag checks switched to args-dump.
DeviceRunner wiring (a2a3 & a5)
device_runner.{h,cpp} (onboard & sim)
init_tensor_dumpinit_args_dump; enable flags and profiling constants renamed.
Runtime executors and schedulers (a2a3 & a5)
aicore_executor.cpp, aicpu_executor.cpp, scheduler_{cold_path,completion,dispatch}.cpp
Gate on PROFILING_FLAG_DUMP_ARGS; pass ArgsDumpStage into dump_args_for_task.
Tests and documentation
tests/ut/cpp/CMakeLists.txt, docs/dfx/*.md, docs/profiling-framework.md, simpler_setup/tools/l0_swimlane.py
Test build sources and docs/CLI text updated to args-dump terminology.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Possibly related PRs

  • hw-native-sys/simpler#1072: Part of the same tensor-dump → args-dump rename, updating dump enablement APIs and CLI/artifact naming.
  • hw-native-sys/simpler#1143: Companion PR updating CI smoke tests/docs/paths to args_dump matching this PR's implementation rename.
  • hw-native-sys/simpler#1242: Touches the same dump-enable wiring in DeviceRunnerBase::apply_call_config and shared collector gating.

Poem

A tensor dump, once proud and bold,
Now wears a new name, shiny gold —
"ArgsDump" hops through every file,
Renamed with care, header by pile 🐰
Through host and AICPU, flags align,
This rabbit's burrow: renamed, refined!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: renaming TensorDump internals to ArgsDump.
Description check ✅ Passed The description is clearly about the same TensorDump→ArgsDump migration reflected in the diff.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Copy link
Copy Markdown

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 performs a comprehensive renaming of the "TensorDump" diagnostic sub-feature to "ArgsDump" across the codebase, including updates to documentation, Python tools, C++ runtime headers, and platform implementation files. The review feedback points out a couple of missed spots where "tensor" terminology or prefixes were still being used: specifically, an exception message in l0_swimlane.py and several helper functions in args_dump_collector.cpp that should be renamed to maintain consistency with the rest of the changes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread simpler_setup/tools/l0_swimlane.py Outdated
Comment thread src/common/platform/shared/host/args_dump_collector.cpp Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (4)
src/a5/runtime/host_build_graph/aicpu/aicpu_executor.cpp (1)

114-115: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale "Dump tensor" comment left behind.

Line 115's comment was updated to reference args dump, but the section header on Line 114 still reads "Dump tensor state". Should be renamed for consistency with the rest of this rename PR.

✏️ Proposed fix
-    // ===== Dump tensor state =====
+    // ===== Args dump state =====
     Runtime *runtime_{nullptr};  // Cached for args dump access in try_dispatch_task
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/a5/runtime/host_build_graph/aicpu/aicpu_executor.cpp` around lines 114 -
115, The section header comment in aicpu_executor.cpp is stale and still says
“Dump tensor state” even though the nearby Runtime cache comment and
try_dispatch_task usage now refer to args dump access. Update the header comment
near runtime_ in aicpu_executor.cpp so it matches the new args-dump naming used
in this rename PR and stays consistent with the surrounding code.
src/a5/platform/onboard/host/device_runner.h (1)

251-258: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale @param num_aicore doc on init_args_dump.

The doc block documents num_aicore but the declared signature int init_args_dump(Runtime &runtime, int device_id); only takes two parameters. This appears to be a leftover from the tensor-dump doc that wasn't fully cleaned up during the rename.

📝 Proposed doc fix
     /**
      * Initialize args dump device buffers.
      *
      * `@param` runtime Runtime instance to configure
-     * `@param` num_aicore Number of AICore instances (unused)
      * `@param` device_id Device ID for allocations
      * `@return` 0 on success, error code on failure
      */
     int init_args_dump(Runtime &runtime, int device_id);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/a5/platform/onboard/host/device_runner.h` around lines 251 - 258, The doc
comment for init_args_dump still mentions a num_aicore parameter that no longer
exists in the function signature. Update the documentation for init_args_dump in
device_runner.h so the `@param` list matches the actual parameters Runtime
&runtime and int device_id, and remove the stale num_aicore entry left over from
the old tensor-dump wording.
src/common/platform/shared/host/args_dump_collector.cpp (1)

411-441: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Leftover tensor_dump_* names in these renamed helpers.

These static helpers now take ArgsDump* types but still carry the tensor_dump_ prefix, leaving a naming inconsistency in a PR whose stated goal is the tensor→args rename. Renaming them (and their call sites at Lines 646-648) keeps the subsystem naming uniform.

♻️ Proposed rename
-static const char *tensor_dump_role_name(ArgsDumpRole role) {
+static const char *args_dump_role_name(ArgsDumpRole role) {
     switch (role) {
     case ArgsDumpRole::INPUT:
         return "input";
     case ArgsDumpRole::OUTPUT:
         return "output";
     case ArgsDumpRole::INOUT:
         return "inout";
     }
     return "unknown";
 }

-static const char *tensor_dump_stage_name(ArgsDumpStage stage) {
+static const char *args_dump_stage_name(ArgsDumpStage stage) {
     switch (stage) {
     case ArgsDumpStage::BEFORE_DISPATCH:
         return "before_dispatch";
     case ArgsDumpStage::AFTER_COMPLETION:
         return "after_completion";
     }
     return "unknown";
 }

-static const char *tensor_dump_kind_name(ArgsDumpKind kind) {
+static const char *args_dump_kind_name(ArgsDumpKind kind) {
     switch (kind) {
     case ArgsDumpKind::TENSOR:
         return "tensor";
     case ArgsDumpKind::SCALAR:
         return "scalar";
     }
     return "unknown";
 }

Corresponding call sites (Lines 646-648) would update to args_dump_role_name / args_dump_stage_name / args_dump_kind_name.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/common/platform/shared/host/args_dump_collector.cpp` around lines 411 -
441, The helper names still use the old tensor prefix even though they now
operate on ArgsDump types, so rename tensor_dump_role_name,
tensor_dump_stage_name, and tensor_dump_kind_name to match the new args-dump
terminology. Update the corresponding call sites in the same collector code to
use the new names so the ArgsDump subsystem naming stays consistent throughout
args_dump_collector.cpp.
src/common/platform/shared/aicpu/args_dump_aicpu.cpp (1)

133-141: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate task-slot addressing logic; unused helper?

resolve_dump_args_task_slot computes the ring_id/slot/idx addressing, but set_dump_args_task_mask and get_dump_args_task_masks both re-derive the same ring_id/slot/idx inline instead of calling it. This is fine functionally today (the three copies agree), but any future change to the pool constants or wrap logic could update one copy and silently miss the others, causing mismatched mask lookups.

Consider having both call sites delegate to resolve_dump_args_task_slot for a single source of truth.

♻️ Proposed consolidation
 extern "C" void set_dump_args_task_mask(uint64_t task_id, ArgsDumpArgMask mask, ArgsDumpArgMask flags) {
     if (mask == ARGS_DUMP_ARG_MASK_NONE) {
         return;
     }
     if (!ensure_dump_args_mask_table()) {
         return;
     }
-    uint32_t ring_id = static_cast<uint32_t>(task_id >> 32);
-    if (ring_id >= ARGS_DUMP_MASK_POOL_MAX_RINGS) {
-        return;
-    }
-    uint32_t slot = static_cast<uint32_t>(task_id) & ARGS_DUMP_MASK_POOL_DEFAULT_SLOT_MASK;
-    uint32_t idx = (ring_id * ARGS_DUMP_MASK_POOL_MAX_SLOTS + slot) & (DUMP_TASK_MASK_TABLE_CAPACITY - 1);
+    uint32_t idx = 0;
+    if (!resolve_dump_args_task_slot(task_id, &idx)) {
+        return;
+    }
     for (uint32_t probe = 0; probe < DUMP_TASK_MASK_TABLE_CAPACITY; probe++) {

Apply the analogous change in get_dump_args_task_masks.

Since I can't see the full file (lines 142-194 are elided as unchanged), please confirm whether resolve_dump_args_task_slot is already used elsewhere; if it's entirely unused, it may also trigger an unused-static-function warning.

Also applies to: 220-243, 245-276

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/common/platform/shared/aicpu/args_dump_aicpu.cpp` around lines 133 - 141,
The task-slot indexing logic is duplicated, and the helper
resolve_dump_args_task_slot should be used as the single source of truth. Update
set_dump_args_task_mask and get_dump_args_task_masks to call
resolve_dump_args_task_slot instead of re-deriving ring_id, slot, and idx
inline, so the mask lookup behavior stays consistent if the pool constants or
wrap logic change. Also verify whether resolve_dump_args_task_slot is referenced
anywhere else in args_dump_aicpu.cpp; if not, either wire it into both call
sites or remove it to avoid an unused-static-function warning.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/dfx/args-dump.md`:
- Around line 833-834: Update the docs example text so it refers to the correct
JSON field name: in the args dump explanation, change the mention of tensors[]
to args[] to match the manifest example. Make this fix in the prose around the
dropped-args description so readers are directed to the same field name used by
the example, using the args dump section’s existing wording as the anchor.
- Around line 75-76: The documentation wording is using a worker handshake field
for profiling enablement, which conflicts with the runtime contract. Update the
`args-dump` text to refer directly to `KernelArgs` and its profiling-related
field(s) instead of `enable_profiling_flag` in the worker handshake, keeping the
description aligned with the host/device flow and the symbols used in the
runtime path.

In `@docs/dfx/dfx-buffer-capacity-audit.md`:
- Line 305: The appendix row is using outdated `DUMP_*` knob names instead of
the documented `PLATFORM_DUMP_*` names. Update the `args_dump` entry in the
audit appendix to match the same `PLATFORM_DUMP_RECORDS_PER_BUFFER` and
`PLATFORM_DUMP_BUFFERS_PER_THREAD` naming used elsewhere so the table stays
consistent.

In `@simpler_setup/tools/l0_swimlane.py`:
- Around line 305-311: The failure message in the args-dump check is partially
renamed and still contains stale tensor-dump wording. Update the RuntimeError
text in the no-new-outputs path of simpler_setup/tools/l0_swimlane.py so the
nested warning phrase matches args dump terminology throughout, keeping the
existing context around test_path.name and the skipped-dump explanation
consistent.

---

Nitpick comments:
In `@src/a5/platform/onboard/host/device_runner.h`:
- Around line 251-258: The doc comment for init_args_dump still mentions a
num_aicore parameter that no longer exists in the function signature. Update the
documentation for init_args_dump in device_runner.h so the `@param` list matches
the actual parameters Runtime &runtime and int device_id, and remove the stale
num_aicore entry left over from the old tensor-dump wording.

In `@src/a5/runtime/host_build_graph/aicpu/aicpu_executor.cpp`:
- Around line 114-115: The section header comment in aicpu_executor.cpp is stale
and still says “Dump tensor state” even though the nearby Runtime cache comment
and try_dispatch_task usage now refer to args dump access. Update the header
comment near runtime_ in aicpu_executor.cpp so it matches the new args-dump
naming used in this rename PR and stays consistent with the surrounding code.

In `@src/common/platform/shared/aicpu/args_dump_aicpu.cpp`:
- Around line 133-141: The task-slot indexing logic is duplicated, and the
helper resolve_dump_args_task_slot should be used as the single source of truth.
Update set_dump_args_task_mask and get_dump_args_task_masks to call
resolve_dump_args_task_slot instead of re-deriving ring_id, slot, and idx
inline, so the mask lookup behavior stays consistent if the pool constants or
wrap logic change. Also verify whether resolve_dump_args_task_slot is referenced
anywhere else in args_dump_aicpu.cpp; if not, either wire it into both call
sites or remove it to avoid an unused-static-function warning.

In `@src/common/platform/shared/host/args_dump_collector.cpp`:
- Around line 411-441: The helper names still use the old tensor prefix even
though they now operate on ArgsDump types, so rename tensor_dump_role_name,
tensor_dump_stage_name, and tensor_dump_kind_name to match the new args-dump
terminology. Update the corresponding call sites in the same collector code to
use the new names so the ArgsDump subsystem naming stays consistent throughout
args_dump_collector.cpp.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27187ca8-4020-4d89-b964-36560504a3ea

📥 Commits

Reviewing files that changed from the base of the PR and between fb65fe9 and 608f3a9.

📒 Files selected for processing (70)
  • docs/dfx/args-dump.md
  • docs/dfx/dfx-buffer-capacity-audit.md
  • docs/dfx/l2-swimlane-profiling.md
  • docs/dfx/pmu-profiling.md
  • docs/profiling-framework.md
  • simpler_setup/tools/l0_swimlane.py
  • src/a2a3/platform/include/aicore/aicore_profiling_state.h
  • src/a2a3/platform/include/common/args_dump.h
  • src/a2a3/platform/include/common/dep_gen.h
  • src/a2a3/platform/include/common/kernel_args.h
  • src/a2a3/platform/include/common/platform_config.h
  • src/a2a3/platform/onboard/aicpu/CMakeLists.txt
  • src/a2a3/platform/onboard/aicpu/kernel.cpp
  • src/a2a3/platform/onboard/host/CMakeLists.txt
  • src/a2a3/platform/onboard/host/device_runner.cpp
  • src/a2a3/platform/onboard/host/device_runner.h
  • src/a2a3/platform/shared/host/l2_swimlane_collector.cpp
  • src/a2a3/platform/sim/host/CMakeLists.txt
  • src/a2a3/platform/sim/host/device_runner.cpp
  • src/a2a3/platform/sim/host/device_runner.h
  • src/a2a3/runtime/host_build_graph/aicore/aicore_executor.cpp
  • src/a2a3/runtime/host_build_graph/aicpu/aicpu_executor.cpp
  • src/a2a3/runtime/host_build_graph/runtime/pto_runtime2_types.h
  • src/a2a3/runtime/host_build_graph/runtime/runtime.h
  • src/a2a3/runtime/tensormap_and_ringbuffer/aicore/aicore_executor.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/aicpu/aicpu_executor.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_orchestrator.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_completion.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp
  • src/a5/platform/include/aicore/aicore_profiling_state.h
  • src/a5/platform/include/common/args_dump.h
  • src/a5/platform/include/common/dep_gen.h
  • src/a5/platform/include/common/kernel_args.h
  • src/a5/platform/include/common/platform_config.h
  • src/a5/platform/include/common/pmu_profiling.h
  • src/a5/platform/onboard/aicpu/CMakeLists.txt
  • src/a5/platform/onboard/aicpu/kernel.cpp
  • src/a5/platform/onboard/host/CMakeLists.txt
  • src/a5/platform/onboard/host/device_runner.cpp
  • src/a5/platform/onboard/host/device_runner.h
  • src/a5/platform/shared/host/l2_swimlane_collector.cpp
  • src/a5/platform/sim/host/CMakeLists.txt
  • src/a5/platform/sim/host/device_runner.cpp
  • src/a5/platform/sim/host/device_runner.h
  • src/a5/runtime/host_build_graph/aicore/aicore_executor.cpp
  • src/a5/runtime/host_build_graph/aicpu/aicpu_executor.cpp
  • src/a5/runtime/host_build_graph/runtime/pto_runtime2_types.h
  • src/a5/runtime/host_build_graph/runtime/runtime.h
  • src/a5/runtime/tensormap_and_ringbuffer/aicore/aicore_executor.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/aicpu/aicpu_executor.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_orchestrator.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_completion.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp
  • src/common/platform/include/aicpu/args_dump_aicpu.h
  • src/common/platform/include/common/scope_stats.h
  • src/common/platform/include/host/args_dump_collector.h
  • src/common/platform/include/host/buffer_pool_manager.h
  • src/common/platform/include/host/profiler_base.h
  • src/common/platform/include/host/profiling_copy.h
  • src/common/platform/onboard/aicpu/spin_hint.h
  • src/common/platform/onboard/host/device_runner_base.cpp
  • src/common/platform/onboard/host/device_runner_base.h
  • src/common/platform/shared/aicpu/args_dump_aicpu.cpp
  • src/common/platform/shared/host/args_dump_collector.cpp
  • src/common/platform/sim/host/device_runner_base.cpp
  • src/common/platform/sim/host/device_runner_base.h
  • src/common/task_interface/data_type.h
  • tests/ut/cpp/CMakeLists.txt

Comment thread docs/dfx/args-dump.md Outdated
Comment thread docs/dfx/args-dump.md Outdated
Comment thread docs/dfx/dfx-buffer-capacity-audit.md Outdated
Comment thread simpler_setup/tools/l0_swimlane.py
@indigo1973 indigo1973 force-pushed the dump_0702 branch 2 times, most recently from 41124f0 to 7953b5b Compare July 6, 2026 02:14
@indigo1973 indigo1973 changed the title Update: rename TensorDump internals to ArgsDump [WIP] Update: rename TensorDump internals to ArgsDump Jul 6, 2026
@indigo1973 indigo1973 force-pushed the dump_0702 branch 2 times, most recently from 031dfe8 to 2198c99 Compare July 7, 2026 02:28
Finishes the tensor-dump -> args-dump naming migration (issue hw-native-sys#1252) by
renaming both the internal implementation and the remaining public and
example surfaces that the earlier passes (hw-native-sys#1072, hw-native-sys#1143) left untouched.

Internal implementation:
- Rename args-dump C++ types, headers, helpers, and CMake source paths
  from TensorDump* to ArgsDump* (collector, AICPU helpers, platform
  headers, DumpArgsLevel, tensor_dump_*.{h,cpp} -> args_dump_*).

Public config field:
- Rename CallConfig::enable_dump_tensor -> enable_dump_args across the
  C++ struct, the L3<->L2 wire codec (remote_wire.cpp and the Python
  remote_l3_protocol.py / worker.py decoders), the nanobind property,
  the host device_runner apply_call_config consumers, scene_test.py, the
  per_task_runtime_env example, and the chip-worker unit tests. The wire
  byte layout is unchanged (the field keeps its position); only the
  identifier is renamed. No compatibility alias is kept, so downstream
  callers (e.g. pypto) must migrate enable_dump_tensor -> enable_dump_args.

Example + docs:
- Rename the host_build_graph dump_tensor example (a2a3 + a5) to
  dump_args: directory, test module, TestDumpTensorExample ->
  TestDumpArgsExample, dump_tensor_orch.cpp -> dump_args_orch.cpp, and
  build_dump_tensor_graph -> build_dump_args_graph (including the copy
  reused by the a5 prepared_callable test). Update the args-dump doc
  links accordingly.
- The TensorInfo metadata API (TensorInfo, set_tensor_info_to_task,
  add_task_with_tensor_info, make_tensor_info_from_tensor_arg) is left
  as-is: it describes tensor shape metadata specifically, not the
  general per-arg dump, so its naming is accurate.

Also fix two stale comments the rename left behind: the "Dump tensor
state" block comment in the a5 aicpu_executor (-> "Args dump state", to
match the adjacent "args dump" wording) and the dump_args_init doc
comment that described threads as dumping "tensors" rather than args.

The tensor_dump.json negative assertions in test_args_dump.py are kept
on purpose: they guard that the legacy filename is never emitted.
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.

1 participant