Skip to content

Test: cover overlapping group reservations - #1614

Merged
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
puddingfjz:feat/group-reservation-onboard-coverage
Aug 3, 2026
Merged

Test: cover overlapping group reservations#1614
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
puddingfjz:feat/group-reservation-onboard-coverage

Conversation

@puddingfjz

@puddingfjz puddingfjz commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a dedicated three-worker scene for overlapping NEXT_LEVEL group reservations
  • hold the first group with a device-side notification instead of timing sleeps
  • prove an unrelated worker can progress while a later group is blocked
  • prove a single on a reserved target cannot overtake the blocked group

Scenario

The first group uses workers {0,1} and leaves worker 1 waiting. A second group for {1,2} blocks at the group queue head. A worker-0 single releases the first group, while a worker-2 single checks a marker written by the second group.

Review context

#1565 (comment)

Testing

  • a2a3sim, three devices: passed
  • a5sim, three devices: passed
  • onboard not run: local DCMI initialization failed before the mandatory architecture precheck (dcmi module initialize failed (-8005))

@coderabbitai

coderabbitai Bot commented Jul 31, 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 Plus

Run ID: 27b87286-012b-455e-a789-ee22cf62c3d8

📥 Commits

Reviewing files that changed from the base of the PR and between a93a331 and dee809f.

📒 Files selected for processing (6)
  • tests/st/worker/collectives/README.md
  • tests/st/worker/collectives/group_reservation/README.md
  • tests/st/worker/collectives/group_reservation/__init__.py
  • tests/st/worker/collectives/group_reservation/kernels/aiv/group_reservation_kernel.cpp
  • tests/st/worker/collectives/group_reservation/kernels/orchestration/group_reservation_orch.cpp
  • tests/st/worker/collectives/group_reservation/test_group_reservation.py

📝 Walkthrough

Walkthrough

Added an end-to-end scene test for overlapping NEXT_LEVEL group reservations. The change includes an AIV kernel, orchestration functions, shared reservation state handling, output markers, platform setup, expected outputs, and test documentation.

Changes

Group reservation validation

Layer / File(s) Summary
Reservation synchronization kernel
tests/st/worker/collectives/group_reservation/kernels/aiv/group_reservation_kernel.cpp
The kernel coordinates ranks with communication signals, accesses remote reservation state, publishes and checks shared state, writes operation markers, and applies memory fences.
AIV task orchestration
tests/st/worker/collectives/group_reservation/kernels/orchestration/group_reservation_orch.cpp
The orchestration configures four arguments and submits the output tensor plus three scalar arguments to rt_submit_aiv_task.
End-to-end scene test and documentation
tests/st/worker/collectives/group_reservation/test_group_reservation.py, tests/st/worker/collectives/group_reservation/README.md, tests/st/worker/collectives/README.md, tests/st/worker/collectives/group_reservation/__init__.py
The test submits overlapping group and single-worker operations, constructs shared-memory arguments, targets supported platforms, and initializes expected outputs. Documentation describes the scenario and simulator command. Package metadata includes the project license header.

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

Sequence Diagram(s)

sequenceDiagram
  participant SceneTest
  participant Orchestration
  participant AIVKernel
  participant ReservationState
  SceneTest->>Orchestration: submit group and worker operations
  Orchestration->>AIVKernel: submit output and scalar arguments
  AIVKernel->>ReservationState: publish and check shared state
  AIVKernel-->>SceneTest: write operation ordering markers
Loading

Possibly related PRs

Poem

A rabbit queued two groups in flight,
Then watched the workers sort it right.
Signals whispered, states were shared,
Markers showed the order cared.
“Hop!” said the test, “the path is clear!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 and concisely describes the added test coverage for overlapping group reservations.
Description check ✅ Passed The description directly explains the overlapping reservation test scenario, expected behavior, supported simulators, and testing status.
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.

@puddingfjz
puddingfjz force-pushed the feat/group-reservation-onboard-coverage branch from 0606452 to 4f42df4 Compare July 31, 2026 15:57
@ChaoWao
ChaoWao force-pushed the feat/group-reservation-onboard-coverage branch from 4f42df4 to dee809f Compare August 3, 2026 01:53
Use a device-side handshake to hold the first group while a second group with overlapping targets queues. Verify an unrelated single can progress and a reserved single cannot overtake the blocked group.

Keep the AICore compatibility attribute defined before intrinsic.h so the hardware compiler sees the kernel and PTO signal calls as device code.
@ChaoWao
ChaoWao merged commit 18ec412 into hw-native-sys:main Aug 3, 2026
16 checks passed
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.

2 participants