From e83a5a08cd9039bc9a7e06e8fbb03442b8346cab Mon Sep 17 00:00:00 2001 From: ChaoZheng109 Date: Mon, 27 Jul 2026 01:05:36 -0700 Subject: [PATCH] Remove the dead dep_gen guards left in the scheduler cold path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dep_gen_aicpu_init() moved to the orchestrator thread (aicpu_executor.cpp) so the schedulers no longer touch it. The two cold-path call sites were emptied to `if (is_dep_gen_enabled()) {}` rather than removed, and the comment above post_handshake_init still described the init() that popped the initial free_queue buffer here — behaviour that no longer runs in this file. Drop both empty guards, the stale comment, and the now-unused dep_gen_collector_aicpu.h include. No dep_gen symbol remains in either scheduler_cold_path.cpp. a2a3 and a5 carry the identical arrangement and are cleaned together. --- .../runtime/scheduler/scheduler_cold_path.cpp | 8 -------- .../runtime/scheduler/scheduler_cold_path.cpp | 8 -------- 2 files changed, 16 deletions(-) diff --git a/src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp b/src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp index 52d760e58..cb8c96f08 100644 --- a/src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp +++ b/src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp @@ -15,7 +15,6 @@ #include "common/unified_log.h" #include "aicpu/aicpu_device_config.h" -#include "aicpu/dep_gen_collector_aicpu.h" #include "aicpu/device_phase_aicpu.h" #include "aicpu/device_time.h" #include "aicpu/l2_swimlane_collector_aicpu.h" @@ -979,7 +978,6 @@ void SchedulerContext::post_handshake_profiling_init() { if (is_pmu_enabled()) { pmu_aicpu_init(physical_core_ids_, cores_total_num_); } - if (is_dep_gen_enabled()) {} #endif } @@ -1213,12 +1211,6 @@ int32_t SchedulerContext::post_handshake_init(Runtime *runtime) { if (is_pmu_enabled()) { pmu_aicpu_init(physical_core_ids_, cores_total_num_); } - // dep_gen is host-driven (SubmitTrace) — runtime-gated by the host flag — - // and compiles out with the other profiling subsystems at SIMPLER_DFX=0. - // init() only pops the initial buffer from instance 0's free_queue; the - // orchestrator thread still records its idx via - // dep_gen_aicpu_set_orch_thread_idx() before the first record_submit. - if (is_dep_gen_enabled()) {} #endif // total_tasks_ is read in pre_handshake_init (before the orchestrator's early diff --git a/src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp b/src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp index 6d4ad2cc1..8ad38a3fb 100644 --- a/src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp +++ b/src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp @@ -15,7 +15,6 @@ #include "common/unified_log.h" #include "aicpu/aicpu_device_config.h" -#include "aicpu/dep_gen_collector_aicpu.h" #include "aicpu/device_phase_aicpu.h" #include "aicpu/device_time.h" #include "aicpu/l2_swimlane_collector_aicpu.h" @@ -971,7 +970,6 @@ void SchedulerContext::post_handshake_profiling_init() { if (is_pmu_enabled()) { pmu_aicpu_init(physical_core_ids_, cores_total_num_); } - if (is_dep_gen_enabled()) {} #endif } @@ -1209,12 +1207,6 @@ int32_t SchedulerContext::post_handshake_init(Runtime *runtime) { if (is_pmu_enabled()) { pmu_aicpu_init(physical_core_ids_, cores_total_num_); } - // dep_gen is host-driven (SubmitTrace) — runtime-gated by the host flag — - // and compiles out with the other profiling subsystems at SIMPLER_DFX=0. - // init() only pops the initial buffer from instance 0's free_queue; the - // orchestrator thread still records its idx via - // dep_gen_aicpu_set_orch_thread_idx() before the first record_submit. - if (is_dep_gen_enabled()) {} #endif // total_tasks_ is read in pre_handshake_init (before the orchestrator's early