Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT: from_dlpack thread safety fixes #28883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025

Conversation

ngoldbaum
Copy link
Member

@ngoldbaum ngoldbaum commented May 1, 2025

Fixes #28881

Moves the global variables defined in from_dlpack to the npy_static_pydata struct and initializes them during module init.

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

LGTM if tests pass, although adding a prefix like dl_ or dlpack_ would be better.

@seberg
Copy link
Member

seberg commented May 2, 2025

Thanks Nathan, save to backport, not sure if we want to.

@seberg seberg merged commit aa7c4f5 into numpy:main May 2, 2025
73 checks passed
@charris charris added 08 - Backport Used to tag backport PRs 09 - Backport-Candidate PRs tagged should be backported and removed 08 - Backport Used to tag backport PRs labels May 2, 2025
charris pushed a commit to charris/numpy that referenced this pull request May 2, 2025
Fixes numpy#28881

Moves the global variables defined in from_dlpack to the npy_static_pydata struct and initializes them during module init.
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 2, 2025
charris added a commit that referenced this pull request May 2, 2025
MAINT: from_dlpack thread safety fixes (#28883)
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull request May 8, 2025
Fixes numpy#28881

Moves the global variables defined in from_dlpack to the npy_static_pydata struct and initializes them during module init.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: data race in from_dlpack method under free-threading
3 participants