Skip to content

Fix: use task_attrs.has_predicate() in the L2 swimlane predicated-skip path#1445

Merged
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
huawei-csl:fix-tmr-taskattrs-has-predicate
Jul 22, 2026
Merged

Fix: use task_attrs.has_predicate() in the L2 swimlane predicated-skip path#1445
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
huawei-csl:fix-tmr-taskattrs-has-predicate

Conversation

@ChaoWao

@ChaoWao ChaoWao commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

#1410 consolidated the per-task dispatch predicates into the TaskAttrs byte — moving has_predicate() from ActiveMask to TaskAttrs and updating the scheduler call sites — but missed the two dummy-drain swimlane-skip calls that #1419 added:

  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp:1222
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp:1031

Both still call dummy_slot.active_mask.has_predicate(). ActiveMask no longer has that member, and the calls sit under #if SIMPLER_DFX (on by default), so the default a2a3sim / a5sim build fails to compile on the current main tip:

scheduler_dispatch.cpp:1222:48: error: 'class ActiveMask' has no member named 'has_predicate'

Each PR was green against its own base; the break only surfaces once both #1410 and #1419 are on main together (a merge-order semantic conflict).

Fix

Point both call sites at dummy_slot.task_attrs.has_predicate(), matching every other has_predicate() caller in the scheduler (e.g. pto_scheduler.h:537/872/938/968/1041/1082).

Validation

a2a3sim and a5sim build clean (host + aicpu + aicore).

🤖 Generated with Claude Code

…p path

hw-native-sys#1410 consolidated the per-task dispatch predicates into the TaskAttrs byte,
moving has_predicate() from ActiveMask to TaskAttrs and updating the scheduler
call sites. It missed the two dummy-drain swimlane-skip calls that hw-native-sys#1419 added:
a2a3 and a5 tensormap_and_ringbuffer scheduler_dispatch.cpp still call
dummy_slot.active_mask.has_predicate(). ActiveMask no longer has that member, so
the default build (the calls sit under SIMPLER_DFX, which is on by default) fails
to compile a2a3sim / a5sim. The two PRs were each green against their own base;
the break only appears once both are on main.

Point both call sites at dummy_slot.task_attrs.has_predicate(), matching every
other has_predicate() caller in the scheduler. a2a3sim and a5sim build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Sergio Martin <sergio.miguel.martin@huawei.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08bb5e54-a673-40e6-b74c-57efd1886928

📥 Commits

Reviewing files that changed from the base of the PR and between e60cfac and 129f64d.

📒 Files selected for processing (2)
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp

📝 Walkthrough

Walkthrough

Dummy-task profiling and tracing in both scheduler variants now determine predicated-skip events from task_attrs.has_predicate() instead of active_mask.has_predicate().

Changes

Scheduler predicate tracing

Layer / File(s) Summary
Use task attributes for dummy-task tracing
src/a2a3/.../scheduler/scheduler_dispatch.cpp, src/a5/.../scheduler/scheduler_dispatch.cpp
Dummy-task instrumentation now checks task_attrs.has_predicate() when selecting predicated-skip versus dummy-task records.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Poem

A bunny checks the task_attrs bright,
And marks skipped hops just right.
No mask can hide the predicate’s trail,
Dummy tasks now leave the proper tale.
- Ears up for cleaner traces! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the change to use task_attrs.has_predicate() in the predicated-skip path.
Description check ✅ Passed The description directly matches the fix, affected files, compile issue, and validation results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

@ChaoWao
ChaoWao merged commit d43742a into hw-native-sys:main Jul 22, 2026
16 checks passed
@ChaoWao
ChaoWao deleted the fix-tmr-taskattrs-has-predicate branch July 22, 2026 13:00
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