Skip to content

Update: refine A5 HBG MIX scheduling and deferred completion - #3207

Closed
nalinaly wants to merge 1 commit into
hw-native-sys:mainfrom
nalinaly:update/a5-hbg-mix-progress-c767d60fb
Closed

nalinaly wants to merge 1 commit into
hw-native-sys:mainfrom
nalinaly:update/a5-hbg-mix-progress-c767d60fb

Conversation

@nalinaly

@nalinaly nalinaly commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Schedule eligible synchronous A5 HBG work using dependencies and per-engine capacity. Reuse local fan-in and execution state, let the returning AIV0 continue MIX publication, and skip peer-order checks when completed predecessors prove that earlier obligations are satisfied.
  • Keep deferred conditions on the registering worker. Rotate pending groups and reuse the verified counter address and threshold for a single-load retry.
  • Update HBG and Percounter L2 worker and scheduling views, dependency arrows through control tasks, and HBG L3 scalar-load attribution. Add a six-stage full-wave MIX chain alongside the seven DSV4.1 model cases.

Scope and review context

This is a single-commit snapshot of the 33 local commits through c767d60fb, based on upstream ae680d950. Its Git tree matches the committed local main tree exactly.

There is substantial overlap with #3189. Review the native Perfetto exporter and Percounter Worker View carefully if integrating the two PRs. #3189 also handles rank-prefixed flow IDs and counter events in the native exporter, and uses kernel entry and return for the Percounter L2 execution bar. This snapshot still expects numeric flow IDs, rejects counter events, and uses the completion fence for the Percounter row end.

Validation

The committed tree matches the source snapshot, and git diff --check passes against upstream main. The packaged scheduler results identify the revisions used for the seven model cases and the synthetic chain. They are historical benchmark measurements.

  • The six targeted Python suites for traces and native protocols passed all 756 tests.
  • With the Python binding and portable native runner built from this snapshot, the benchmark suite passed 57 tests. Two start-gate tests failed during setup for the default and --flavor all selections. Their subprocess.run mock returns None when the new synthetic bundle builder probes the compiler. The bound-solver module was skipped because the test environment lacks OR-Tools.

Order eligible synchronous catalog entries by engine demand and dependency
order. Track one ordinary and one MIX slot per lane, reuse validated state
at pickup, and continue MIX publication when the returning AIV0 owns it.
Skip peer-order checks only when completed predecessors prove the order.

Settle deferred condition groups on their registering worker, rotate pending
groups, and reuse the validated counter address and threshold on retries.
Preserve output visibility before releasing dependent tasks.

Expose HBG and Percounter scheduling and kernel intervals in L2 traces,
reduce HBG trace overhead, and attribute L3 claim loads by source.
Add a six-stage full-wave MIX chain to the scheduler benchmark.
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 128 files, which is 28 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2022785e-7bee-4006-9b07-455df0921fd4
Commits

Reviewing files that changed from the base of the PR and between ae680d9 and 84ea107.

Files selected for processing: 128

  • docs/dfx/chip-swimlane-profiling.md
  • docs/investigations/2026-11-a5-hbg-gm-mix-arrival-permit.md
  • docs/zh-cn/a5-hbg-aicore-walkthrough/01-initialization.md
  • docs/zh-cn/a5-hbg-aicore-walkthrough/02-ready-execution.md
  • docs/zh-cn/a5-hbg-aicore-walkthrough/03-cooperative-completion.md
  • docs/zh-cn/a5-hbg-aicore-walkthrough/04-native-async.md
  • docs/zh-cn/a5-hbg-aicore-walkthrough/README.md
  • docs/zh-cn/design/a5-hbg-async-completion.md
  • docs/zh-cn/design/a5-hbg-async-completion/interfaces-and-layout.md
  • docs/zh-cn/design/a5-hbg-graph-task/build-execute-separation.md
  • docs/zh-cn/design/a5-hbg-graph-task/data-layout.md
  • docs/zh-cn/design/a5-hbg-graph-task/dependency-counters.md
  • docs/zh-cn/design/a5-hbg-graph-task/protocol.md
  • docs/zh-cn/design/a5-hbg-graph-task/ready-queue-design.md
  • simpler_setup/tools/hbg/execution_identity.py
  • simpler_setup/tools/hbg/native_mix_audit.py
  • simpler_setup/tools/hbg/native_protocol.py
  • simpler_setup/tools/hbg/phases.py
  • simpler_setup/tools/hbg/scalar_profile.py
  • simpler_setup/tools/hbg/schedule_timing.py
  • simpler_setup/tools/l2_pftrace.py
  • simpler_setup/tools/percounter/schedule_timing.py
  • simpler_setup/tools/percounter/scheduler_view.py
  • simpler_setup/tools/swimlane_converter.py
  • src/a5/platform/include/host/scheduler_notification_address.h
  • src/a5/platform/onboard/host/scheduler_done_notifications.cpp
  • src/a5/runtime/host_build_graph/aicore/aicore_executor.cpp
  • src/a5/runtime/host_build_graph/aicore/resident_native_timing.cpp
  • src/a5/runtime/host_build_graph/aicore/resident_ordinary_timing.cpp
  • src/a5/runtime/host_build_graph/aicore/resident_scheduler_impl.h
  • src/a5/runtime/host_build_graph/aicpu/aicore_lifecycle.cpp
  • src/a5/runtime/host_build_graph/aicpu/aicore_scheduler_error.h
  • src/a5/runtime/host_build_graph/aicpu/aicpu_executor.cpp
  • src/a5/runtime/host_build_graph/docs/RUNTIME_LOGIC.md
  • src/a5/runtime/host_build_graph/docs/SUBMIT_BY_CLUSTER.md
  • src/a5/runtime/host_build_graph/host/async_completion_plan.cpp
  • src/a5/runtime/host_build_graph/host/native_graph_plan.cpp
  • src/a5/runtime/host_build_graph/host/runtime_maker.cpp
  • src/a5/runtime/host_build_graph/host/scheduler_protocol_export.h
  • src/a5/runtime/host_build_graph/host/task_catalog_deferral.h
  • src/a5/runtime/host_build_graph/host/task_catalog_plan.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_async_control.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_async_directory.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_async_finish.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_async_layout.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_async_state.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_cluster_mix.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_cluster_signal.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_completion.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_completion_counter.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_completion_credit.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_dispatch.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_execution_tokens.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_graph.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_graph_binding.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_graph_control.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_issue.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_memory.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_native_graph.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_native_graph_access.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_order.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_prepared_execution.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_prepared_layout.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_protocol.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_ready.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_scalar_record.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_scalar_trace.h
  • src/a5/runtime/host_build_graph/runtime/scheduler/scheduler_types.h
  • src/a5/runtime/percounter/README.md
  • src/a5/runtime/percounter/aicore/entry.cpp
  • src/a5/runtime/percounter/aicore/lane_loop.h
  • src/a5/runtime/percounter/aicpu/steps.cpp
  • src/a5/runtime/percounter/host/profiling.cpp
  • src/a5/runtime/percounter/host/region_plan.h
  • src/a5/runtime/percounter/host/state.h
  • src/a5/runtime/percounter/runtime/scheduler/profiling_types.h
  • src/common/host_build_graph/sched_phase_kind.h
  • src/common/platform/include/host/scheduler_notifications.h
  • src/common/platform/shared/aicpu/chip_swimlane_collector_aicpu.cpp
  • src/common/task_interface/core_async_capability.h
  • tests/fdwic/dsv41_scheduler/README.md
  • tests/fdwic/dsv41_scheduler/RESULTS.md
  • tests/fdwic/dsv41_scheduler/analyze.py
  • tests/fdwic/dsv41_scheduler/kernels/synthetic/full_wave_mix_chain.cpp
  • tests/fdwic/dsv41_scheduler/kernels/synthetic/full_wave_mix_member.cpp
  • tests/fdwic/dsv41_scheduler/production/full_wave_mix_chain.py
  • tests/fdwic/dsv41_scheduler/production/ideal_bound.py
  • tests/fdwic/dsv41_scheduler/production/list_cases.py
  • tests/fdwic/dsv41_scheduler/production/prepare.py
  • tests/fdwic/dsv41_scheduler/production/run.sh
  • tests/fdwic/dsv41_scheduler/production/runner.cpp
  • tests/fdwic/dsv41_scheduler/production/sync_bound.py
  • tests/fdwic/dsv41_scheduler/production/timing.py
  • tests/fdwic/dsv41_scheduler/production/topology.py
  • tests/fdwic/dsv41_scheduler/tests/test_case_selection.py
  • tests/st/a5/percounter/dfx/chip_swimlane/test_chip_swimlane.py
  • tests/ut/cpp/a5/platform/test_scheduler_notification_cache.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/CMakeLists.txt
  • tests/ut/cpp/a5/runtime/host_build_graph/hbg_scheduler_test_support.h
  • tests/ut/cpp/a5/runtime/host_build_graph/scalar_policy_test_body.h
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_admission_progress.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_async_control.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_async_directory.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_async_plan.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_async_state.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_cluster_owned_groups.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_error_identity.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_execution_ownership.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_gm_mix.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_gm_mix_startup.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_inline_services.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_native_graph_plan.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_ordered_execution.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_owned_execution.h
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_protocol_export.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_retirement_wiring.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_scalar_trace.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_scheduler_dispatch.cpp
  • tests/ut/cpp/a5/runtime/host_build_graph/test_hbg_task_catalog.cpp
  • tests/ut/cpp/a5/runtime/percounter/test_payload.cpp
  • tests/ut/cpp/common/host_build_graph/test_hbg_bind_ledger.cpp
  • tests/ut/py/_native_protocol_builder.py
  • tests/ut/py/test_hbg_execution_identity.py
  • tests/ut/py/test_hbg_native_causality.py
  • tests/ut/py/test_hbg_native_protocol.py
  • tests/ut/py/test_hbg_scalar_profile.py
  • tests/ut/py/test_percounter_scalar_profile.py
  • tests/ut/py/test_swimlane_converter.py

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

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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