Skip to content

Fix: preserve full task IDs for swimlane DAG nodes#1332

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

Fix: preserve full task IDs for swimlane DAG nodes#1332
indigo1973 wants to merge 1 commit into
hw-native-sys:mainfrom
indigo1973:l2_0710

Conversation

@indigo1973

Copy link
Copy Markdown
Contributor

Summary

  • record complete dummy task IDs in a2a3 and a5 scheduler phase data
  • render dummy and alloc DAG nodes on AICPU lanes in Worker View
  • connect dependency flows to those nodes using complete task identity
  • distinguish tasks with the same local ID on different rings

Testing

  • python -m pytest tests/ut/py/test_swimlane_converter.py -q (14 passed)
  • python -m ruff check simpler_setup/tools/swimlane_converter.py tests/ut/py/test_swimlane_converter.py
  • python -m pyright simpler_setup/tools/swimlane_converter.py tests/ut/py/test_swimlane_converter.py
  • pip install --no-build-isolation -e . (a2a3/a5 runtime build)
  • hardware tests (not run)

@coderabbitai

coderabbitai Bot commented Jul 11, 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: f7cf2d9f-e6cb-484c-8881-78e58ddc6d8b

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

The change adds full DummyTask identities to scheduler-phase records and uses them, along with orchestrator allocation metadata, to anchor dependency flows on AICPU worker slices in generated Perfetto traces. Documentation and regression tests describe and verify the updated behavior.

Changes

Dummy and alloc dependency flow anchoring

Layer / File(s) Summary
Full task identity record contract
src/a2a3/platform/include/..., src/a5/platform/include/...
Scheduler-phase APIs and fixed-size records now carry full PTO2 task identities for DummyTask records.
Scheduler recording and export
src/a2a3/runtime/..., src/a5/runtime/..., src/common/platform/shared/...
Dummy task dispatch records full identifiers, the collector stores them, and JSON export emits them for dummy phases.
Synthetic worker flow endpoints
simpler_setup/tools/swimlane_converter.py
Dependency flows can use synthetic AICPU worker anchors for scheduler dummy tasks and orchestrator allocations.
Trace behavior documentation and tests
docs/dfx/l2-swimlane-profiling.md, tests/ut/py/test_swimlane_converter.py
Documentation and tests cover full task identities, worker-slice anchoring, and generated dummy/alloc dependency flows.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SchedulerContext
  participant L2SwimlaneCollector
  participant swimlane_converter
  participant Perfetto
  SchedulerContext->>L2SwimlaneCollector: record DummyTask task_id
  L2SwimlaneCollector->>swimlane_converter: export DummyTask task_id
  swimlane_converter->>swimlane_converter: create dummy/alloc worker anchors
  swimlane_converter->>Perfetto: emit dependency flow endpoints
Loading

Possibly related PRs

Poem

A bunny watched the dummy flow,
With full task IDs in tow.
Worker slices caught each thread,
Alloc arrows found their bed.
Perfetto hops in rows of blue!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: preserving full task IDs for swimlane DAG nodes.
Description check ✅ Passed The description matches the changeset and its goals around full task IDs, DAG node rendering, and dependency flows.
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.

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 updates the swimlane profiling and trace generation to use the full 64-bit task_id instead of the low 32-bit tasks_processed for dummy tasks and alloc DAG nodes, allowing dependency flow arrows to anchor correctly on AICPU worker slices. The changes span documentation, the Python trace converter, C++ runtime schedulers, and unit tests. Feedback in the review suggests adding a fallback to the low 32-bit task ID from tasks_processed for backward compatibility with older trace files that lack the task_id field, preventing dummy tasks from being labeled as 'unknown'.

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/swimlane_converter.py
- Record full dummy task IDs in scheduler phase data on a2a3 and a5
- Anchor dummy and alloc dependency flows on AICPU Worker View events
- Classify non-kernel DAG nodes by complete task identity across rings
- Cover same-local-ID ring collisions in converter unit tests
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