Skip to content

Fix SM resource alignment discovery test#2389

Open
rwgk wants to merge 1 commit into
NVIDIA:mainfrom
rwgk:nvbug6464867_test_green_context_fix
Open

Fix SM resource alignment discovery test#2389
rwgk wants to merge 1 commit into
NVIDIA:mainfrom
rwgk:nvbug6464867_test_green_context_fix

Conversation

@rwgk

@rwgk rwgk commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

Fix the SM resource discovery alignment test for CUDA 13.4 (currently still in developer preview) reported under nvbug 6464867.

Analysis (gpt-5.6-sol)

SMResourceOptions(count=None) produces an unconstrained structured split request. CUDA 13.4 may satisfy that request with every available SM; on B100, that is 148. The device independently reports its default co-scheduling alignment as 8, but that alignment is not imposed unless the request supplies a co-scheduling constraint. The previous 148 % 8 == 0 assertion therefore tested a guarantee the API no longer makes.

Both values come directly from driver-populated resource structures, and cuda.bindings forwards the CUDA 13.4 structured split ABI without calculating either value. This is a cuda.core test expectation issue.

Fix

Explicitly request coscheduled_sm_count=sm_resource.coscheduled_alignment before asserting that the discovered group count is divisible by that alignment. Skip the test when the CUDA driver or bindings predate structured split support (CUDA 13.1), or when the device reports no co-scheduling alignment.

@rwgk rwgk added this to the cuda.core 1.2.0 milestone Jul 19, 2026
@rwgk rwgk self-assigned this Jul 19, 2026
@rwgk rwgk added P0 High priority - Must do! test Improvements or additions to tests cuda.core Everything related to the cuda.core module labels Jul 19, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk

rwgk commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3e7f0fb

@rwgk rwgk added the PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. label Jul 19, 2026
@github-actions

Copy link
Copy Markdown

@rwgk
rwgk marked this pull request as ready for review July 19, 2026 18:38
@rwgk
rwgk requested a review from leofang July 19, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module P0 High priority - Must do! PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant