Skip to content

Fix peer semaphore indexing in the host-offloaded allgather test - #979

Open
Changho Hwang (chhwang) wants to merge 1 commit into
microsoft:mainfrom
chhwang:fix/host-offloaded-allgather-rank-slots-Zqs0iHnc
Open

Changho Hwang (chhwang) wants to merge 1 commit into
microsoft:mainfrom
chhwang:fix/host-offloaded-allgather-rank-slots-Zqs0iHnc

Conversation

@chhwang

Copy link
Copy Markdown
Contributor

MyProxyService appends a null entry for the local rank before it appends any peer semaphores. The handle getters and the proxy both index those vectors by peer rank. With two ranks, rank 1 therefore looks up peer 0 in slot 0, which is null, and crashes in Host2DeviceSemaphore::deviceHandle() before its first kernel launch.

Size both semaphore vectors to world_size and assign each peer's semaphore to slot r, as the test already does for connections. Only the self slot remains null. This changes only the test's semaphore construction; it leaves the data check and benchmark unchanged.

Validation: git diff --check, formatting, and focused local rank-mapping checks for both vectors. No GPU run was performed on this PR or its base (215f073). On the earlier 4dab9f5 baseline, the two-rank test exited 139. A broader local candidate on that earlier base, containing the same indexing fix and a separate correctness-verdict change, completed the 65,536-byte test on two GB200 GPUs with no reported mismatches. The verdict change is not in this PR.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@chhwang
Changho Hwang (chhwang) marked this pull request as ready for review November 26, 2026 06:39
@chhwang
Changho Hwang (chhwang) requested review from Binyang Li (Binyang2014) and a balanced review from Copilot and removed request for Copilot November 26, 2026 06:39

This branch has not been deployed

No deployments
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