Skip to content

[Portability] quantize_block C->C++, use std::thread everywhere #1024

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 1 commit into from
Feb 5, 2024

Conversation

rickardp
Copy link
Contributor

@rickardp rickardp commented Feb 3, 2024

Code change broken out from PR #949 to keep this change separate from the portability/pipelines in that PR.

Since pthread is not available on all platforms, we use C++ standard threads instead. Since we are using this anyway, we can as well swich all uses to standard C++.

The quantize_block function was written in C, using unsafe ptrs (probably to support being used with pthread). This PR changes this to more canonical C++.

Note: This is not sufficient to make the code compile on macOS, the code changes in #949 are still needed for that

Copy link

github-actions bot commented Feb 4, 2024

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Titus-von-Koeller Titus-von-Koeller merged commit 332530b into bitsandbytes-foundation:main Feb 5, 2024
@Titus-von-Koeller
Copy link
Collaborator

Titus-von-Koeller commented Feb 5, 2024

Thanks @rickardp 🙏🏻

@rickardp rickardp deleted the thread branch February 5, 2024 16:26
akx added a commit to akx/bitsandbytes that referenced this pull request Mar 7, 2024
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.

2 participants