Skip to content

OMP build diagnostics (#4842)#4842

Closed
ddrcoder wants to merge 1 commit into
facebookresearch:mainfrom
ddrcoder:export-D94394555
Closed

OMP build diagnostics (#4842)#4842
ddrcoder wants to merge 1 commit into
facebookresearch:mainfrom
ddrcoder:export-D94394555

Conversation

@ddrcoder
Copy link
Copy Markdown
Contributor

@ddrcoder ddrcoder commented Feb 26, 2026

Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on faiss:faiss_no_multithreading instead of faiss:faiss.

This adds faiss::has_omp(), which returns true if a #pragma omp parallel region had any effect through the use of a reduction(max) which would otherwise be stripped out.

Note:

  1. Compile-time check is not sufficient, as the faiss_no_multithreading and/or faiss_omp_mock targets control whether the faiss/*.cpp implementations have effective #pragma omp blocks.
  2. Depending on the BUCK build mode, a cpp_binary which depends on faiss:faiss_no_multithreading and faiss:faiss may or may not link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555

@meta-cla meta-cla Bot added the CLA Signed label Feb 26, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Feb 26, 2026

@ddrcoder has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94394555.

ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Feb 26, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Feb 26, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
@ddrcoder ddrcoder force-pushed the export-D94394555 branch 2 times, most recently from f7402b0 to b649398 Compare February 27, 2026 00:16
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Feb 27, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
@meta-codesync meta-codesync Bot changed the title OMP build diagnostics OMP build diagnostics (#4842) Mar 18, 2026
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 18, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 18, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
@ddrcoder ddrcoder force-pushed the export-D94394555 branch 2 times, most recently from 8d9260b to ed1a2a0 Compare March 18, 2026 14:50
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 18, 2026
Summary:
Pull Request resolved: facebookresearch#4842

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 26, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 26, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 26, 2026
Summary:
Pull Request resolved: facebookresearch#4842

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
@ddrcoder ddrcoder force-pushed the export-D94394555 branch 2 times, most recently from 551a38e to 00a0604 Compare March 26, 2026 18:28
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Mar 26, 2026
Summary:
Pull Request resolved: facebookresearch#4842

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Apr 6, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Apr 6, 2026
Summary:

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
ddrcoder added a commit to ddrcoder/faiss that referenced this pull request Apr 6, 2026
Summary:
Pull Request resolved: facebookresearch#4842

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
Summary:
Pull Request resolved: facebookresearch#4842

Some tools which depend on FAISS recently became much slower because they were accidentally changed to depend on `faiss:faiss_no_multithreading` instead of `faiss:faiss`.

This adds `faiss::has_omp()`, which returns true if a `#pragma omp parallel` region had any effect through the use of a `reduction(max)` which would otherwise be stripped out.

Note:
1. Compile-time check is not sufficient, as the `faiss_no_multithreading` and/or `faiss_omp_mock` targets control whether the `faiss/*.cpp` implementations have effective `#pragma omp` blocks.
2. Depending on the BUCK build mode, a `cpp_binary` which depends on `faiss:faiss_no_multithreading` and `faiss:faiss` *may or may not* link to implementations with OpenMP support.

Reviewed By: subhadeepkaran

Differential Revision: D94394555
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 8, 2026

This pull request has been merged in 95f1e45.

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.

1 participant