Skip to content

test/tile: size NVSHMEM_MAX_TEAMS for duplicate NVLS teams - #141

Open
0z5a wants to merge 1 commit into
NVIDIA:develfrom
0z5a:fix-tile-test-max-teams
Open

0z5a wants to merge 1 commit into
NVIDIA:develfrom
0z5a:fix-tile-test-max-teams

Conversation

@0z5a

@0z5a 0z5a commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #139.

tile_allgather and tile_allreduce set NVSHMEM_MAX_TEAMS to the number of teams they create plus the internal teams, one slot each. With NVLS, nvshmemi_duplicate_team() also creates duplicate teams for the collective CTAs whenever a team is split: max(NVSHMEMI_REDUCESCATTER_CTA_COUNT_DEFAULT, NVSHMEMI_FCOLLECT_CTA_COUNT_DEFAULT / 2, NVSHMEMI_REDUCE_CTA_COUNT_DEFAULT) slots per team, or NVSHMEM_MAX_CTAS when it is set. Both tests therefore run out of teams during setup on NVLS systems.

This multiplies the requested count by the slots per team, using the same constants as the library (the tests already include nvshmem_common.cuh). A user-provided NVSHMEM_MAX_TEAMS is still respected. test/host/team/shmem_team_split_2d.cpp avoids the same problem by setting NVSHMEM_MAX_CTAS=2; I did not do that here, so that the tile collectives keep running with the default CTA count.

Tested

B300, devel eaf955f, built for sm_103, PEs on one node over NVSwitch, default environment unless noted:

Test PEs devel this PR
tile_allgather 2 exit 255, out of teams pass
tile_allreduce 2 exit 255, out of teams pass
tile_allgather, NVSHMEM_MAX_CTAS=1 2 pass
tile_allreduce, NVSHMEM_MAX_CTAS=1 2 pass
tile_allgather 3 exit 255, out of teams pass
tile_allreduce 3 exit 255, out of teams pass

Not changed here: with NVSHMEM_DISABLE_NVLS=1, the NVLS tile algorithms these tests use return NVSHMEMX_ERROR_INVALID_VALUE, and tile_allreduce can then leave one PE waiting after the other returns (see #139).

The commit carries a DCO sign-off.

tile_allgather and tile_allreduce create one team per thread, warp,
warpgroup or block and set NVSHMEM_MAX_TEAMS to that count plus the
internal teams. With NVLS, nvshmemi_duplicate_team() also creates
duplicate teams for the collective CTAs whenever a team is split, so
each team takes max(NVSHMEMI_REDUCESCATTER_CTA_COUNT_DEFAULT,
NVSHMEMI_FCOLLECT_CTA_COUNT_DEFAULT / 2,
NVSHMEMI_REDUCE_CTA_COUNT_DEFAULT) slots, or NVSHMEM_MAX_CTAS when it is
set. Both tests then run out of teams during setup on NVLS systems.

Multiply the requested count by the slots per team.

Fixes NVIDIA#139.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
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.

tile_allgather and tile_allreduce tests run out of teams with NVLS: the NVSHMEM_MAX_TEAMS they set ignores duplicate teams

1 participant