Skip to content

Switch to standard C11 atomics on android and with nvcc. #27463

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
Jun 25, 2025

Conversation

asmorkalov
Copy link
Contributor

Alternative to #27425

Both Android and NVCC checks are very old and not relevant for the modern tools.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Contributor Author

cc @vrabaud

@vrabaud
Copy link
Contributor

vrabaud commented Jun 20, 2025

I would even re-write that whole atomic code with standard C++: https://en.cppreference.com/w/cpp/atomic/atomic/fetch_add.html

@asmorkalov asmorkalov requested review from vpisarev and mshabunin June 23, 2025 12:51
@asmorkalov
Copy link
Contributor Author

@vpisarev @mshabunin Please review.

@mshabunin
Copy link
Contributor

In general looks good to me.
Minor concerns regarding older CUDA toolkits. Which version is the oldest we support? Will it work? In CI I see 11.7(?) which is ~2022:

--   NVIDIA CUDA:                   YES (ver 11.7, CUFFT CUBLAS)
--     NVIDIA GPU arch:             61
--     NVIDIA PTX archs:

@asmorkalov
Copy link
Contributor Author

It works with my jetson nano, CUDA 10.2. Looking for older configuration.

@asmorkalov asmorkalov merged commit e9f1da7 into opencv:4.x Jun 25, 2025
51 of 55 checks passed
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy