Skip to content

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

Open
seberg wants to merge 1 commit into
NVIDIA:mainfrom
seberg:smresource-revert
Open

Revert SMResource splitting fix, the problem was the test#2321
seberg wants to merge 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

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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.

1 participant