Skip to content

Conversation

@robertmaynard
Copy link
Contributor

Proper support to disable OpenMP also requires that any calls to functions like omp_get_max_threads need to be guarded by a _OPENMP check.

This is done by adding openmp wrapper functions into cuvs/core that properly handle the _OPENMP guards and behave as required when OpenMP is disabled.

Required to fix #1322

Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

We could refactor the functions a bit

Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

Related to previous comment

Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

Thanks! Looks great.

@robertmaynard
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 833299f into rapidsai:branch-25.12 Oct 17, 2025
162 of 164 checks passed
@robertmaynard robertmaynard deleted the bug/guard_usage_of_openmp_functions branch October 17, 2025 14:22
enp1s0 pushed a commit to enp1s0/cuvs that referenced this pull request Oct 22, 2025
Proper support to disable OpenMP also requires that any calls to functions like `omp_get_max_threads` need to be guarded by a `_OPENMP` check.

This is done by adding openmp wrapper functions into `cuvs/core` that properly handle the `_OPENMP` guards and behave as required when OpenMP is disabled. 

Required to fix rapidsai#1322

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Divye Gala (https://github.com/divyegala)

URL: rapidsai#1435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

[BUG] CMake build flag DISABLE_OPENMP doesn't actually disable OpenMP

2 participants