Skip to content

Revert SMResource splitting fix, the problem was the test#2321

Merged
seberg merged 1 commit into
NVIDIA:mainfrom
seberg:smresource-revert
Jul 24, 2026
Merged

Revert SMResource splitting fix, the problem was the test#2321
seberg merged 1 commit into
NVIDIA:mainfrom
seberg:smresource-revert

Conversation

@seberg

@seberg seberg commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

I got things wrong, I think. While completely harmless to have the lock, I think we can consider SMResource as thread-unsafe as it is based of Device() and the green-context where Device() is thread-local and green-contexts are by definition thread unsafe to share.

There is probably some documentation that would be good that sharing device objects across threads is unsafe (to the point of crashes). But I now think the correct fix, at least for now, is to just fix the test and I have included that here.

@Andy-Jost sorry about this but FYI since you merged the other PR for me.

@seberg seberg self-assigned this Jul 8, 2026
@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Jul 8, 2026
@seberg seberg added the enhancement Any code-related improvements label Jul 8, 2026
@seberg
seberg force-pushed the smresource-revert branch from b51beb2 to 1e05dbd Compare July 8, 2026 11:50
@seberg
seberg force-pushed the smresource-revert branch from 1e05dbd to 7a150b0 Compare July 8, 2026 11:57
@seberg seberg added the P1 Medium priority - Should do label Jul 8, 2026
@github-actions

This comment has been minimized.

@Andy-Jost Andy-Jost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. Under the concurrency rules, the mutex is not needed here.

@seberg
seberg enabled auto-merge (squash) July 24, 2026 10:55
@seberg
seberg merged commit e51fb7f into NVIDIA:main Jul 24, 2026
202 of 206 checks passed
@seberg
seberg deleted the smresource-revert branch July 24, 2026 11:13
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

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 enhancement Any code-related improvements P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants